You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While calling an api call inside a iconButton callback in footer 2 things happens:
if I am not using async/await in iconButton callback with advcontroller.pause() before API call and advcontroller.resume() after API call frozen the progress bar but does not thorws any error and moves to next content without resuming the progressbar.
if I am using async/await in iconbuttom callback with advcontroller.pause() before API call and advcontroller.resume() after API call it gives me following error for advcontroller.resume() : AssertionError
('package:flutter/src/animation/animation_controller.dart': Failed
assertion: line 527 pos 7: '_ticker != null':
AnimationController.animateTo() called after
AnimationController.dispose()
AnimationController methods should not be used after calling dispose.)
To Reproduce
Steps to reproduce the behavior:
here is my implementation of logic:
IconButton(
onPressed: () async {
storyController.pause();
await ref
.read(storyProvider
.notifier)
.likePostById(
postId:
currentStory
.id);
storyController
.resume();
},
icon: Icon(
Icons.favorite,)),
Expected behavior
to freeze the progress indicator while calling API and resume after completing the API
versions
Flutter 3.10.5
Dart 3.0.5
The text was updated successfully, but these errors were encountered:
Describe the bug
While calling an api call inside a iconButton callback in footer 2 things happens:
('package:flutter/src/animation/animation_controller.dart': Failed
assertion: line 527 pos 7: '_ticker != null':
AnimationController.animateTo() called after
AnimationController.dispose()
AnimationController methods should not be used after calling dispose.)
To Reproduce
Steps to reproduce the behavior:
here is my implementation of logic:
IconButton(
onPressed: () async {
storyController.pause();
await ref
.read(storyProvider
.notifier)
.likePostById(
postId:
currentStory
.id);
storyController
.resume();
Expected behavior
to freeze the progress indicator while calling API and resume after completing the API
versions
The text was updated successfully, but these errors were encountered: