Remove AsyncValue.previous, refactor .future/.stream and renamed .future to .last (#852)

This commit is contained in:
Remi Rousselet
2021-10-24 23:05:48 +02:00
committed by GitHub
parent e6a5552ee2
commit cb9ce91dea
40 changed files with 773 additions and 1576 deletions

View File

@ -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(),