Skip to content

Commit

Permalink
Merge pull request #173 from awhitford/voidOnNext
Browse files Browse the repository at this point in the history
Fix: onNext callback has a void return type, and is not a VoidCallback.
  • Loading branch information
aagarwal1012 committed Dec 13, 2020
2 parents 86242fe + bc5ac1a commit dad2c68
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/src/animated_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ class AnimatedTextKit extends StatefulWidget {
/// This method will run only if [isRepeatingAnimation] is set to false.
final VoidCallback onFinished;

/// Adds the onNext [VoidCallback] to the animated widget.
/// Adds the onNext callback to the animated widget.
///
/// Will be called right before the next text, after the pause parameter
final void Function(int, bool) onNext;

/// Adds the onNextBeforePause [VoidCallback] to the animated widget.
/// Adds the onNextBeforePause callback to the animated widget.
///
/// Will be called at the end of n-1 animation, before the pause parameter
final void Function(int, bool) onNextBeforePause;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/colorize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class ColorizeAnimatedTextKit extends AnimatedTextKit {
Duration speed = const Duration(milliseconds: 200),
Duration pause = const Duration(milliseconds: 1000),
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/fade.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class FadeAnimatedTextKit extends AnimatedTextKit {
Duration duration = const Duration(milliseconds: 2000),
Duration pause = const Duration(milliseconds: 500),
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/rotate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class RotateAnimatedTextKit extends AnimatedTextKit {
Duration duration = const Duration(milliseconds: 2000),
Duration pause = const Duration(milliseconds: 500),
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/scale.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ScaleAnimatedTextKit extends AnimatedTextKit {
Duration duration = const Duration(milliseconds: 2000),
Duration pause = const Duration(milliseconds: 500),
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/typer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TyperAnimatedTextKit extends AnimatedTextKit {
bool displayFullTextOnTap = false,
bool stopPauseOnTap = false,
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/typewriter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class TypewriterAnimatedTextKit extends AnimatedTextKit {
bool displayFullTextOnTap = false,
bool stopPauseOnTap = false,
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/wavy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class WavyAnimatedTextKit extends AnimatedTextKit {
Duration speed = const Duration(milliseconds: 300),
Duration pause = const Duration(milliseconds: 1000),
VoidCallback onTap,
Function(int, bool) onNext,
void Function(int, bool) onNext,
void Function(int, bool) onNextBeforePause,
VoidCallback onFinished,
bool isRepeatingAnimation = true,
Expand Down

0 comments on commit dad2c68

Please sign in to comment.