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'),
|
error: (error, stack) => Text('Error: $error'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,14 +303,14 @@ class FavoritesPage extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
child: _FavoritesGrid(products: previousValue),
|
child: _FavoritesGrid(products: previousValue),
|
||||||
),
|
),
|
||||||
const Positioned(
|
Positioned(
|
||||||
top: 16,
|
top: 16,
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Card(
|
child: Card(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 16.0,
|
horizontal: 16.0,
|
||||||
vertical: 8.0,
|
vertical: 8.0,
|
||||||
),
|
),
|
||||||
@@ -322,8 +322,8 @@ class FavoritesPage extends HookConsumerWidget {
|
|||||||
height: 16,
|
height: 16,
|
||||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text('Đang tải...'),
|
const Text('Đang tải...'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:worker/core/widgets/loading_indicator.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:worker/core/router/app_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';
|
import 'package:worker/features/home/domain/entities/promotion.dart';
|
||||||
|
|
||||||
/// Promotion Slider Widget
|
/// Promotion Slider Widget
|
||||||
@@ -127,7 +127,7 @@ class _PromotionCard extends StatelessWidget {
|
|||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
height: 140,
|
height: 140,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const const CustomLoadingIndicator(),
|
child: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
errorWidget: (context, url, error) => Container(
|
errorWidget: (context, url, error) => Container(
|
||||||
height: 140,
|
height: 140,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
|||||||
}
|
}
|
||||||
return _buildContent(context, article);
|
return _buildContent(context, article);
|
||||||
},
|
},
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => _buildErrorState(context, error.toString()),
|
error: (error, stack) => _buildErrorState(context, error.toString()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -127,7 +127,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
|||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
height: 250,
|
height: 250,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const const CustomLoadingIndicator(),
|
child: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
errorWidget: (context, url, error) => Container(
|
errorWidget: (context, url, error) => Container(
|
||||||
height: 250,
|
height: 250,
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class FeaturedNewsCard extends StatelessWidget {
|
|||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const const CustomLoadingIndicator(),
|
child: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
errorWidget: (context, url, error) => Container(
|
errorWidget: (context, url, error) => Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class NewsCard extends StatelessWidget {
|
|||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const Center(
|
child: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class RelatedArticleCard extends StatelessWidget {
|
|||||||
width: 60,
|
width: 60,
|
||||||
height: 60,
|
height: 60,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const Center(
|
child: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class NotificationsPage extends HookConsumerWidget {
|
|||||||
notifications,
|
notifications,
|
||||||
selectedCategory,
|
selectedCategory,
|
||||||
),
|
),
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) =>
|
error: (error, stack) =>
|
||||||
_buildErrorState(ref, selectedCategory),
|
_buildErrorState(ref, selectedCategory),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => Center(
|
error: (error, stack) => Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
border: Border.all(color: colorScheme.outlineVariant),
|
border: Border.all(color: colorScheme.outlineVariant),
|
||||||
),
|
),
|
||||||
child: isLoading
|
child: isLoading
|
||||||
? const const CustomLoadingIndicator()
|
? const CustomLoadingIndicator()
|
||||||
: qrCodeData != null && qrCodeData.isNotEmpty
|
: qrCodeData != null && qrCodeData.isNotEmpty
|
||||||
? QrImageView(
|
? QrImageView(
|
||||||
data: qrCodeData,
|
data: qrCodeData,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class PaymentsPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => _buildErrorState(context, ref, error),
|
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(
|
error: (error, stack) => Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|||||||
@@ -639,7 +639,7 @@ class _SubmissionCreatePageState extends ConsumerState<SubmissionCreatePage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
SizedBox(
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
||||||
@@ -895,7 +895,7 @@ class _SubmissionCreatePageState extends ConsumerState<SubmissionCreatePage> {
|
|||||||
width: 48,
|
width: 48,
|
||||||
height: 48,
|
height: 48,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const Center(
|
child: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ class SubmissionsPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => RefreshIndicator(
|
error: (error, stack) => RefreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await ref.read(allSubmissionsProvider.notifier).refresh();
|
await ref.read(allSubmissionsProvider.notifier).refresh();
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
|
|||||||
foregroundColor: AppColors.grey900,
|
foregroundColor: AppColors.grey900,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
),
|
),
|
||||||
body: const const CustomLoadingIndicator(),
|
body: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
error: (error, stack) => Scaffold(
|
error: (error, stack) => Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
@@ -202,7 +202,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
|
|||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
color: AppColors.grey100,
|
color: AppColors.grey100,
|
||||||
child: const const CustomLoadingIndicator(),
|
child: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
errorWidget: (context, url, error) => Container(
|
errorWidget: (context, url, error) => Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class PromotionsPage extends ConsumerWidget {
|
|||||||
child: promotionsAsync.when(
|
child: promotionsAsync.when(
|
||||||
data: (promotions) =>
|
data: (promotions) =>
|
||||||
_buildPromotionsContent(context, promotions),
|
_buildPromotionsContent(context, promotions),
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => Center(
|
error: (error, stack) => Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class PromotionCard extends StatelessWidget {
|
|||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
height: 150,
|
height: 150,
|
||||||
color: AppColors.grey100,
|
color: AppColors.grey100,
|
||||||
child: const const CustomLoadingIndicator(),
|
child: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
errorWidget: (context, url, error) => Container(
|
errorWidget: (context, url, error) => Container(
|
||||||
height: 150,
|
height: 150,
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ class DesignRequestDetailPage extends ConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => Center(
|
error: (error, stack) => Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(40),
|
padding: const EdgeInsets.all(40),
|
||||||
@@ -558,7 +558,7 @@ class DesignRequestDetailPage extends ConsumerWidget {
|
|||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const Center(
|
child: Center(
|
||||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
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(
|
error: (error, stack) => Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(40),
|
padding: const EdgeInsets.all(40),
|
||||||
@@ -408,7 +408,7 @@ class ModelHouseDetailPage extends ConsumerWidget {
|
|||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const Center(
|
child: Center(
|
||||||
child: CustomLoadingIndicator(color: colorScheme.primary, size: 20),
|
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(
|
error: (error, stack) => Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(40),
|
padding: const EdgeInsets.all(40),
|
||||||
@@ -287,7 +287,7 @@ class _LibraryCard extends StatelessWidget {
|
|||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
color: colorScheme.surfaceContainerHighest,
|
color: colorScheme.surfaceContainerHighest,
|
||||||
child: const const CustomLoadingIndicator(),
|
child: const CustomLoadingIndicator(),
|
||||||
),
|
),
|
||||||
errorWidget: (context, url, error) => Container(
|
errorWidget: (context, url, error) => Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
@@ -424,7 +424,7 @@ class _DesignRequestsTab extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading: () => const const CustomLoadingIndicator(),
|
loading: () => const CustomLoadingIndicator(),
|
||||||
error: (error, stack) => Center(
|
error: (error, stack) => Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(40),
|
padding: const EdgeInsets.all(40),
|
||||||
|
|||||||
80
pubspec.lock
80
pubspec.lock
@@ -9,6 +9,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "91.0.0"
|
version: "91.0.0"
|
||||||
|
_flutterfire_internals:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: _flutterfire_internals
|
||||||
|
sha256: "8a1f5f3020ef2a74fb93f7ab3ef127a8feea33a7a2276279113660784ee7516a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.64"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -441,6 +449,78 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.3+4"
|
version: "0.9.3+4"
|
||||||
|
firebase_analytics:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_analytics
|
||||||
|
sha256: bfb80d92eee10a6585ebd5a7e60de5caf0f2c06329e5676c0578130aea1bfe85
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "12.0.4"
|
||||||
|
firebase_analytics_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_analytics_platform_interface
|
||||||
|
sha256: "3b803077907def997044774f6c022d8e9204e9c0f5e205e3572d887c93dafd72"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.0.4"
|
||||||
|
firebase_analytics_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_analytics_web
|
||||||
|
sha256: "0dbd96dbe77b51185319000c0078477fdcffb4abb0018c362dd9afb9845c1e06"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.1"
|
||||||
|
firebase_core:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_core
|
||||||
|
sha256: "1f2dfd9f535d81f8b06d7a50ecda6eac1e6922191ed42e09ca2c84bd2288927c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.2.1"
|
||||||
|
firebase_core_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_platform_interface
|
||||||
|
sha256: cccb4f572325dc14904c02fcc7db6323ad62ba02536833dddb5c02cac7341c64
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.2"
|
||||||
|
firebase_core_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_web
|
||||||
|
sha256: ff18fabb0ad0ed3595d2f2c85007ecc794aadecdff5b3bb1460b7ee47cded398
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.3.0"
|
||||||
|
firebase_messaging:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_messaging
|
||||||
|
sha256: "22086f857d2340f5d973776cfd542d3fb30cf98e1c643c3aa4a7520bb12745bb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "16.0.4"
|
||||||
|
firebase_messaging_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_messaging_platform_interface
|
||||||
|
sha256: a59920cbf2eb7c83d34a5f354331210ffec116b216dc72d864d8b8eb983ca398
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.7.4"
|
||||||
|
firebase_messaging_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_messaging_web
|
||||||
|
sha256: "1183e40e6fd2a279a628951cc3b639fcf5ffe7589902632db645011eb70ebefb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.1.0"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ dependencies:
|
|||||||
hive_ce: ^2.6.0
|
hive_ce: ^2.6.0
|
||||||
hive_ce_flutter: ^2.1.0
|
hive_ce_flutter: ^2.1.0
|
||||||
|
|
||||||
|
#Firebase
|
||||||
|
firebase_core: 4.2.1
|
||||||
|
firebase_analytics: 12.0.4
|
||||||
|
firebase_messaging: 16.0.4
|
||||||
|
|
||||||
# Code Generation
|
# Code Generation
|
||||||
freezed_annotation: ^3.0.0
|
freezed_annotation: ^3.0.0
|
||||||
json_annotation: ^4.9.0
|
json_annotation: ^4.9.0
|
||||||
|
|||||||
Reference in New Issue
Block a user