Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version - NoSuchMethodError: The method '*' was called on null. #50

Closed
RaviKavaiya opened this issue Mar 7, 2019 · 7 comments
Closed

Comments

@RaviKavaiya
Copy link

RaviKavaiya commented Mar 7, 2019

Hello, I am using the latest version of flare_flutter 1.3.0
Reference code : https://github.com/tarek360/Boring-Star-Animation (all same, but version 1.3.0)
The code works fine out of the box, but when I changed the animation, it displayed, but a still image (not a moving animation)
And, this was the error :

E/flutter (24934): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method '*' was called on null. E/flutter (24934): Receiver: null E/flutter (24934): Tried calling: *(0.0) E/flutter (24934): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5) E/flutter (24934): #1 KeyFrameStrokeEnd.setValue (package:flare_dart/animation/keyframe.dart:1161:33) E/flutter (24934): #2 KeyFrameNumeric.apply (package:flare_dart/animation/keyframe.dart:138:5) E/flutter (24934): #3 PropertyAnimation.apply (package:flare_dart/animation/actor_animation.dart:199:21) E/flutter (24934): #4 ComponentAnimation.apply (package:flare_dart/animation/actor_animation.dart:248:27) E/flutter (24934): #5 ActorAnimation.apply (package:flare_dart/animation/actor_animation.dart:403:26) E/flutter (24934): #6 FlareActorRenderObject._updateAnimation (package:flare_flutter/flare_actor.dart:468:19) E/flutter (24934): #7 FlareActorRenderObject.filename=.<anonymous closure> (package:flare_flutter/flare_actor.dart:245:11) E/flutter (24934): #8 _rootRunUnary (dart:async/zone.dart:1132:38) E/flutter (24934): #9 _CustomZone.runUnary (dart:async/zone.dart:1029:19) E/flutter (24934): #10 _FutureListener.handleValue (dart:async/future_impl.dart:126:18) E/flutter (24934): #11 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45) E/flutter (24934): #12 Future._propagateToListeners (dart:async/future_impl.dart:668:32) E/flutter (24934): #13 Future._complete (dart:async/future_impl.dart:473:7) E/flutter (24934): #14 _SyncCompleter.complete (dart:async/future_impl.dart:51:12) E/flutter (24934): #15 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20) E/flutter (24934): #16 _rootRun (dart:async/zone.dart:1120:38) E/flutter (24934): #17 _CustomZone.run (dart:async/zone.dart:1021:19) E/flutter (24934): #18 _CustomZone.runGuarded (dart:async/zone.dart:923:7) E/flutter (24934): #19 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23) E/flutter (24934): #20 _rootRun (dart:async/zone.dart:1124:13) E/flutter (24934): #21 _CustomZone.run (dart:async/zone.dart:1021:19) E/flutter (24934): #22 _CustomZone.runGuarded (dart:async/zone.dart:923:7) E/flutter (24934): #23 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23) E/flutter (24934): #24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) E/flutter (24934): #25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) E/flutter (24934):

The animation :
https://www.2dimensions.com/a/innocent/files/flare/status_success

EDIT : I used both binary and json formats, but no luck :(

EDIT 2 : I used below animation and is WORKING fine :
https://www.2dimensions.com/a/pollux/files/flare/smiley-switch

I don't know what is the problem with my animation :(

@luigi-rosso
Copy link
Contributor

Thanks for reporting, I'll look into this today and report back.

@luigi-rosso
Copy link
Contributor

I've just pushed an updated flare_flutter 1.3.1 which should fix this issue. Please try it out and let me know!

@RaviKavaiya
Copy link
Author

Thanks for the update. I will check it as soon as possible as I get free and report back

@RaviKavaiya
Copy link
Author

@luigi-rosso I tried the same animation with version 1.3.2. No, the problem is not resolved.
I wonder that there must be a problem with my animation. What do you say?

@umberto-sonnino
Copy link
Contributor

Hey @RaviKavaiya, we investigated this a bit further and it appears to be a combination of both!
You set your Trim Path keys for the Check shape in your animation, and then you set Trim Path to Off afterwards.
So you can circumvent the issue right now by setting instead to Sequential
We're working on a fix in the meantime!

umberto-sonnino added a commit that referenced this issue Mar 8, 2019
Prevent these values to be null e.g. issue #50
@RaviKavaiya
Copy link
Author

@umberto-sonnino OK, I set it to Sequential and it works fine.

@nurbek-b
Copy link

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building HomePage(dirty, state: _HomePageState#6755f):
The method '*' was called on null.
Receiver: null
Tried calling: *(0.85)

The relevant error-causing widget was:
HomePage file:///Users/macbookpro/Desktop/agro/lib/screens/home/home_screen.dart:17:5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants