fix
This commit is contained in:
@@ -368,7 +368,7 @@ class FavoriteProductsList extends ConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Text('Error: $error'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -303,14 +303,14 @@ class FavoritesPage extends HookConsumerWidget {
|
||||
},
|
||||
child: _FavoritesGrid(products: previousValue),
|
||||
),
|
||||
const Positioned(
|
||||
Positioned(
|
||||
top: 16,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
),
|
||||
@@ -322,8 +322,8 @@ class FavoritesPage extends HookConsumerWidget {
|
||||
height: 16,
|
||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Text('Đang tải...'),
|
||||
const SizedBox(width: 8),
|
||||
const Text('Đang tải...'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
library;
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:worker/core/widgets/loading_indicator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:worker/core/router/app_router.dart';
|
||||
import 'package:worker/core/widgets/loading_indicator.dart';
|
||||
import 'package:worker/features/home/domain/entities/promotion.dart';
|
||||
|
||||
/// Promotion Slider Widget
|
||||
@@ -127,7 +127,7 @@ class _PromotionCard extends StatelessWidget {
|
||||
placeholder: (context, url) => Container(
|
||||
height: 140,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const const CustomLoadingIndicator(),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 140,
|
||||
|
||||
@@ -61,7 +61,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
}
|
||||
return _buildContent(context, article);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => _buildErrorState(context, error.toString()),
|
||||
),
|
||||
);
|
||||
@@ -127,7 +127,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
placeholder: (context, url) => Container(
|
||||
height: 250,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const const CustomLoadingIndicator(),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 250,
|
||||
|
||||
@@ -66,7 +66,7 @@ class FeaturedNewsCard extends StatelessWidget {
|
||||
placeholder: (context, url) => Container(
|
||||
height: 200,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const const CustomLoadingIndicator(),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 200,
|
||||
|
||||
@@ -58,7 +58,7 @@ class NewsCard extends StatelessWidget {
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
|
||||
@@ -57,7 +57,7 @@ class RelatedArticleCard extends StatelessWidget {
|
||||
width: 60,
|
||||
height: 60,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
|
||||
@@ -53,7 +53,7 @@ class NotificationsPage extends HookConsumerWidget {
|
||||
notifications,
|
||||
selectedCategory,
|
||||
),
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) =>
|
||||
_buildErrorState(ref, selectedCategory),
|
||||
),
|
||||
|
||||
@@ -193,7 +193,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -226,7 +226,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
||||
border: Border.all(color: colorScheme.outlineVariant),
|
||||
),
|
||||
child: isLoading
|
||||
? const const CustomLoadingIndicator()
|
||||
? const CustomLoadingIndicator()
|
||||
: qrCodeData != null && qrCodeData.isNotEmpty
|
||||
? QrImageView(
|
||||
data: qrCodeData,
|
||||
|
||||
@@ -72,7 +72,7 @@ class PaymentsPage extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => _buildErrorState(context, ref, error),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -165,7 +165,7 @@ class _PricePolicyPageState extends ConsumerState<PricePolicyPage>
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -639,7 +639,7 @@ class _SubmissionCreatePageState extends ConsumerState<SubmissionCreatePage> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(
|
||||
SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||
@@ -895,7 +895,7 @@ class _SubmissionCreatePageState extends ConsumerState<SubmissionCreatePage> {
|
||||
width: 48,
|
||||
height: 48,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
|
||||
@@ -180,7 +180,7 @@ class SubmissionsPage extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
await ref.read(allSubmissionsProvider.notifier).refresh();
|
||||
|
||||
@@ -70,7 +70,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
|
||||
foregroundColor: AppColors.grey900,
|
||||
centerTitle: false,
|
||||
),
|
||||
body: const const CustomLoadingIndicator(),
|
||||
body: const CustomLoadingIndicator(),
|
||||
),
|
||||
error: (error, stack) => Scaffold(
|
||||
appBar: AppBar(
|
||||
@@ -202,7 +202,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
|
||||
placeholder: (context, url) => Container(
|
||||
height: 200,
|
||||
color: AppColors.grey100,
|
||||
child: const const CustomLoadingIndicator(),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 200,
|
||||
|
||||
@@ -44,7 +44,7 @@ class PromotionsPage extends ConsumerWidget {
|
||||
child: promotionsAsync.when(
|
||||
data: (promotions) =>
|
||||
_buildPromotionsContent(context, promotions),
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -58,7 +58,7 @@ class PromotionCard extends StatelessWidget {
|
||||
placeholder: (context, url) => Container(
|
||||
height: 150,
|
||||
color: AppColors.grey100,
|
||||
child: const const CustomLoadingIndicator(),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 150,
|
||||
|
||||
@@ -492,7 +492,7 @@ class DesignRequestDetailPage extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(40),
|
||||
@@ -558,7 +558,7 @@ class DesignRequestDetailPage extends ConsumerWidget {
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) => Container(
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -86,7 +86,7 @@ class ModelHouseDetailPage extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(40),
|
||||
@@ -408,7 +408,7 @@ class ModelHouseDetailPage extends ConsumerWidget {
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) => Container(
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -215,7 +215,7 @@ class _LibraryTab extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(40),
|
||||
@@ -287,7 +287,7 @@ class _LibraryCard extends StatelessWidget {
|
||||
placeholder: (context, url) => Container(
|
||||
height: 200,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
child: const const CustomLoadingIndicator(),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 200,
|
||||
@@ -424,7 +424,7 @@ class _DesignRequestsTab extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const const CustomLoadingIndicator(),
|
||||
loading: () => const CustomLoadingIndicator(),
|
||||
error: (error, stack) => Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(40),
|
||||
|
||||
Reference in New Issue
Block a user