mirror of
https://github.com/rrousselGit/riverpod.git
synced 2025-08-26 10:35:32 +08:00
Remove AsyncValue.previous, refactor .future/.stream and renamed .future to .last (#852)
This commit is contained in:
@ -120,10 +120,10 @@ class MyHomePage extends HookConsumerWidget {
|
||||
final count = ref.watch(questionsCountProvider);
|
||||
|
||||
return count.when(
|
||||
loading: (_) => const Center(
|
||||
loading: () => const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
error: (err, stack, _) {
|
||||
error: (err, stack) {
|
||||
if (err is DioError) {
|
||||
return Text(
|
||||
err.response!.data.toString(),
|
||||
|
Reference in New Issue
Block a user