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

AsyncValue Issue #3481

Open
LokiEvilOne opened this issue Apr 8, 2024 · 3 comments
Open

AsyncValue Issue #3481

LokiEvilOne opened this issue Apr 8, 2024 · 3 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@LokiEvilOne
Copy link

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(),
);
},
),

@LokiEvilOne LokiEvilOne added bug Something isn't working needs triage labels Apr 8, 2024
@rrousselGit
Copy link
Owner

Without a complete example there's not much I can do.

@rrousselGit rrousselGit added question Further information is requested and removed needs triage labels Apr 8, 2024
@LokiEvilOne
Copy link
Author

Screenshot 2024-04-08 172508
above attached image , i want to fetch the balance that time loading not working directly comes the value.

@gdurandrexel
Copy link

, i want to fetch the balance that time loading not working directly comes the value.

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
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants