Skip to content

Commit

Permalink
[refactor] Rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
biocarl committed Jul 21, 2019
1 parent f954417 commit 0945566
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/src/abstract_drawing_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ abstract class AbstractAnimatedDrawingState extends State<AnimatedDrawing> {
AbstractAnimatedDrawingState() {
this.onFinishAnimation = onFinishAnimationDefault;
}

AnimationController controller;
CurvedAnimation curve;
Curve animationCurve;
Expand Down Expand Up @@ -230,8 +231,8 @@ abstract class AbstractAnimatedDrawingState extends State<AnimatedDrawing> {
size: Size.copy(MediaQuery.of(context).size));
}

//Call this after controller is defined in child classes
void listenToController() {
// TODO Refactor
void addListenersToAnimationController() {
if (this.debug.recordFrames) {
this.controller.view.addListener(() {
setState(() {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/drawing_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AnimatedDrawingState extends AbstractAnimatedDrawingState {
void initState() {
super.initState();
this.controller = this.widget.controller;
listenToController();
addListenersToAnimationController();
}

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/src/drawing_state_with_ticker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AnimatedDrawingWithTickerState extends AbstractAnimatedDrawingState
vsync: this,
duration: widget.duration,
);
listenToController();
addListenersToAnimationController();
}

@override
Expand Down

0 comments on commit 0945566

Please sign in to comment.