update loaing
This commit is contained in:
@@ -201,7 +201,7 @@ class FavoritesPage extends ConsumerWidget {
|
||||
return ProductCard(productId: productId);
|
||||
},
|
||||
),
|
||||
loading: () => CircularProgressIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Text('Error: $error'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ class FavoritesPage extends ConsumerWidget {
|
||||
return ProductTile(productId: productId);
|
||||
},
|
||||
),
|
||||
loading: () => CircularProgressIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => ErrorWidget(error),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -204,11 +204,11 @@ class FavoritesPage extends ConsumerWidget {
|
||||
},
|
||||
);
|
||||
},
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
loading: () => const Center(child: const CustomLoadingIndicator()),
|
||||
error: (error, stack) => Center(child: Text('Error: $error')),
|
||||
);
|
||||
},
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
loading: () => const Center(child: const CustomLoadingIndicator()),
|
||||
error: (error, stack) => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -368,7 +368,7 @@ class FavoriteProductsList extends ConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
loading: () => const CircularProgressIndicator(),
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Text('Error: $error'),
|
||||
);
|
||||
}
|
||||
@@ -417,7 +417,7 @@ class FavoritesPageWithRefresh extends ConsumerWidget {
|
||||
return ListTile(title: Text('Product: $productId'));
|
||||
},
|
||||
),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
loading: () => const Center(child: const CustomLoadingIndicator()),
|
||||
error: (error, stack) => Center(child: Text('Error: $error')),
|
||||
),
|
||||
),
|
||||
@@ -466,7 +466,7 @@ class FavoriteButtonWithLoadingState extends ConsumerWidget {
|
||||
loading: () => const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
child: CustomLoadingIndicator(strokeWidth: 2),
|
||||
),
|
||||
error: (error, stack) => IconButton(
|
||||
icon: const Icon(Icons.error, color: Colors.grey),
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:worker/core/widgets/loading_indicator.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -319,9 +320,7 @@ class FavoritesPage extends HookConsumerWidget {
|
||||
SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
),
|
||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Text('Đang tải...'),
|
||||
|
||||
Reference in New Issue
Block a user