diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d8803f..d0bd041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## 1.0.0 +## 0.0.1 * Initial release. diff --git a/lib/auto_scroll_text.dart b/lib/auto_scroll_text.dart index d27ba6d..585f185 100644 --- a/lib/auto_scroll_text.dart +++ b/lib/auto_scroll_text.dart @@ -61,6 +61,8 @@ class AutoScrollTextState extends State super.initState(); } + TextStyle get defaultTextStyle => const TextStyle(); + /// Timer for animation void _startTimer() { if (_scrollKey.currentContext != null) { @@ -91,14 +93,14 @@ class AutoScrollTextState extends State String newString = textToScroll.split("").join("\n"); return Text( newString, - style: widget.textStyle, + style: widget.textStyle ?? defaultTextStyle, textAlign: TextAlign.center, ); } return Text( textToScroll, + style: widget.textStyle ?? defaultTextStyle, textAlign: TextAlign.justify, - style: widget.textStyle, ); } diff --git a/pubspec.yaml b/pubspec.yaml index 24a004b..3852621 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: auto_scroll_text -description: A new Flutter package project. +description: AutoScrollText is package for users which need a single line text widget without overlaping or TextOverflow.elipsis for long texts. version: 0.0.1 homepage: