From 336dd18626d80b8d20fcf4186bfb9e155bdc1817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wr=C3=B3bel?= Date: Fri, 14 Oct 2022 03:07:59 +0200 Subject: [PATCH] update --- CHANGELOG.md | 2 +- lib/auto_scroll_text.dart | 6 ++++-- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) 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: