|
|
@ -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, |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|