Skip to content

Commit

Permalink
Fix Null-Error when custom controller provided
Browse files Browse the repository at this point in the history
  • Loading branch information
biocarl committed May 2, 2019
1 parent bf6d861 commit af9dc72
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 18 deletions.
8 changes: 4 additions & 4 deletions example/example_01/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ packages:
drawing_animation:
dependency: "direct main"
description:
path: "../.."
relative: true
source: path
version: "0.0.7"
name: drawing_animation
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.8"
flutter:
dependency: "direct main"
description: flutter
Expand Down
3 changes: 2 additions & 1 deletion example/example_01/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ environment:
dependencies:
flutter:
sdk: flutter
drawing_animation: ^0.0.8
drawing_animation:
path: ../../
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
Expand Down
1 change: 1 addition & 0 deletions example/example_02/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class SvgDrawingWithCustomControllerState
}

void _startAnimation() {
print('uhu');
if (_running) {
_controller.stop();
} else {
Expand Down
18 changes: 9 additions & 9 deletions example/example_02/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.2.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -46,10 +46,10 @@ packages:
drawing_animation:
dependency: "direct main"
description:
name: drawing_animation
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.5"
path: "../.."
relative: true
source: path
version: "0.0.8"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -66,7 +66,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.3+1"
version: "0.12.5"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -108,7 +108,7 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.3"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -134,7 +134,7 @@ packages:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.8"
version: "2.0.0"
string_scanner:
dependency: transitive
description:
Expand All @@ -155,7 +155,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.2"
version: "0.2.5"
typed_data:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion example/example_02/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ environment:
dependencies:
flutter:
sdk: flutter
drawing_animation: ^0.0.8
drawing_animation:
path: ../../

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
Expand Down
3 changes: 2 additions & 1 deletion example/example_03/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependencies:
flutter:
sdk: flutter
url_launcher: ^4.2.0+1
drawing_animation: ^0.0.8
drawing_animation:
path: ../../

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
Expand Down
3 changes: 2 additions & 1 deletion example/example_04/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ environment:
dependencies:
flutter:
sdk: flutter
drawing_animation: ^0.0.8
drawing_animation:
path: ../../
path_provider: ^0.5.0
simple_permissions: ^0.1.9
vector_math: any
Expand Down
2 changes: 1 addition & 1 deletion lib/src/drawing_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ abstract class _AbstractAnimatedDrawingState extends State<AnimatedDrawing> {

Animation<double> getAnimation() {
Animation<double> animation;
if (!this.widget.run) {
if (this.widget.run == null || !this.widget.run) {
animation = this.controller;
} else if (this.curve != null &&
this.animationCurve == widget.animationCurve) {
Expand Down

0 comments on commit af9dc72

Please sign in to comment.