Browse Source

update

pull/1/head
Bartosz Wróbel 2 years ago
parent
commit
336dd18626
  1. 2
      CHANGELOG.md
  2. 6
      lib/auto_scroll_text.dart
  3. 2
      pubspec.yaml

2
CHANGELOG.md

@ -1,3 +1,3 @@
## 1.0.0 ## 0.0.1
* Initial release. * Initial release.

6
lib/auto_scroll_text.dart

@ -61,6 +61,8 @@ class AutoScrollTextState extends State<AutoScrollText>
super.initState(); super.initState();
} }
TextStyle get defaultTextStyle => const TextStyle();
/// Timer for animation /// Timer for animation
void _startTimer() { void _startTimer() {
if (_scrollKey.currentContext != null) { if (_scrollKey.currentContext != null) {
@ -91,14 +93,14 @@ class AutoScrollTextState extends State<AutoScrollText>
String newString = textToScroll.split("").join("\n"); String newString = textToScroll.split("").join("\n");
return Text( return Text(
newString, newString,
style: widget.textStyle, style: widget.textStyle ?? defaultTextStyle,
textAlign: TextAlign.center, textAlign: TextAlign.center,
); );
} }
return Text( return Text(
textToScroll, textToScroll,
style: widget.textStyle ?? defaultTextStyle,
textAlign: TextAlign.justify, textAlign: TextAlign.justify,
style: widget.textStyle,
); );
} }

2
pubspec.yaml

@ -1,5 +1,5 @@
name: auto_scroll_text 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 version: 0.0.1
homepage: homepage:

Loading…
Cancel
Save