-
Notifications
You must be signed in to change notification settings - Fork 86
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
Getting an error while trying to show the success state #14
Comments
Hi @hoponaillc I'm struggling to reproduce this one. Could you post the example code you're running? |
I'm facing the same issue, i'm using Forms to validate data, when the form is empty on validation i get the _btnController.error() succefull call and after 3 seconds i reset the controller, and after that if i add some data and validate again then there is this error "Unhandled Exception: NoSuchMethodError: The method 'call' was called on null." minimal code is doingSomething() {
|
Any solution to this? |
Have you tried calling |
I also got this error when I use Bloc, I init the controller in the State Class. |
I also got this error when the widget is hidden and shown by Flutter, for example inside a Stepper. I've resolved the issue overriding didChangeDependencies on RoundedLoadingButtonState:
and removing UPDATE: After some hours, I had the same error again. The solution isn't good. |
@dumabg Were you able to find a solution? I'm facing the same error. The animation only works outside Stepper. |
The problem happens every time the widget that holds the controller changes (so the controller itself changes). The problem occurs because some fields in the controller gets initialized only one time in the initState of the RoundedLoadingButton, so when the controller changes but the state doesn't change, the fields don't get initialized. |
Getting the below error in the sample code for 3 seconds timer. Button showing in the in-progress state all the time. Any idea how to fix it?
/flutter (14084): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
E/flutter (14084): Receiver: null
E/flutter (14084): Tried calling: call()
E/flutter (14084): 0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
E/flutter (14084): 1 RoundedLoadingButtonController.success
package:rounded_loading_button/rounded_loading_button.dart:261
E/flutter (14084): 2 _LoginPageState.build._sendOTP.
package:flutterloginui/main.dart:158
E/flutter (14084): 3 _rootRun (dart:async/zone.dart:1180:38)
E/flutter (14084): 4 _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (14084): 5 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
E/flutter (14084): 6 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1019:23)
E/flutter (14084): 7 _rootRun (dart:async/zone.dart:1184:13)
E/flutter (14084): 8 _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (14084): 9 _CustomZone.bindCallback. (dart:async/zone.dart:1003:23)
E/flutter (14084): 10 Timer._createTimer. (dart:async-patch/timer_patch.dart:23:15)
E/flutter (14084): 11 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
E/flutter (14084): 12 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
E/flutter (14084): 13 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
The text was updated successfully, but these errors were encountered: