-
-
Notifications
You must be signed in to change notification settings - Fork 908
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
AsyncValue Issue #3481
Comments
Without a complete example there's not much I can do. |
rrousselGit
added
question
Further information is requested
and removed
needs triage
labels
Apr 8, 2024
We would at least need the code of balanceProvider. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When utilizing the balanceProvider, the balance.when() method does not consistently enter the loading state as expected. Instead, it either directly throws an error or fails to update the value properly, resulting in unexpected behavior.
balance.when(
data: (balance) {
setState(() {
userBalance = balance;
});
return customText(
average: widget.average,
value: "Balance: ${balance.floor()}",
fontSize: topTextFontSize,
fontColor: Colors.black,
fontWeight: topTextFontWeight,
);
},
error: (e, s) {
return const Text("-");
},
loading: () {
debugPrint("Running");
return const SizedBox(
width: 50.0,
child: LinearProgressIndicator(),
);
},
),
The text was updated successfully, but these errors were encountered: