From 6c22c8bdc312945592f3ad1e45366c9db62f1db1 Mon Sep 17 00:00:00 2001 From: Jeremiah Parrack Date: Mon, 30 Oct 2023 15:03:09 -0400 Subject: [PATCH] better formating --- example/lib/main.dart | 4 ++-- lib/src/chord_parser.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index ebb887a..81e3dfe 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -163,7 +163,7 @@ class _HomePageState extends State { void initState() { super.initState(); _lyrics = ''' -1 + [C]Give me Freedom, [F]Give me fire [Am]Give me reason, [G]Take me higher [C]See the champions [F], Take the field now @@ -174,7 +174,7 @@ class _HomePageState extends State { [Am]Unify us, [G]make us feel proud {eoc} -2 + [C]In the streets our, [F]hands are lifting [Am]As we lose our, [G]inhibition [C]Celebration, [F]its around us diff --git a/lib/src/chord_parser.dart b/lib/src/chord_parser.dart index cf36c42..f571c85 100644 --- a/lib/src/chord_parser.dart +++ b/lib/src/chord_parser.dart @@ -142,7 +142,7 @@ class ChordProcessor { final lastChordWidth = textWidth(lastChordText, chordStyle); // final sizeOfThisChord = textWidth(_chordsSoFar, chordStyle); - double leadingSpace = max(0, sizeOfLeadingLyrics - lastChordWidth - 15); + double leadingSpace = max(1, sizeOfLeadingLyrics - lastChordWidth - 15); final transposedChord = chordTransposer.transposeChord(_chordsSoFar);