update icon
This commit is contained in:
@@ -5,6 +5,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
@@ -112,7 +113,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
|
||||
// Share options
|
||||
ListTile(
|
||||
leading: const Icon(Icons.chat, color: AppColors.primaryBlue),
|
||||
leading: const FaIcon(FontAwesomeIcons.message, color: AppColors.primaryBlue, size: 20),
|
||||
title: const Text('Chia sẻ qua tin nhắn'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
@@ -124,7 +125,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.share, color: AppColors.primaryBlue),
|
||||
leading: const FaIcon(FontAwesomeIcons.shareNodes, color: AppColors.primaryBlue, size: 20),
|
||||
title: const Text('Chia sẻ khác'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
@@ -132,7 +133,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.copy, color: AppColors.primaryBlue),
|
||||
leading: const FaIcon(FontAwesomeIcons.copy, color: AppColors.primaryBlue, size: 20),
|
||||
title: const Text('Sao chép link'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
@@ -178,7 +179,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
backgroundColor: const Color(0xFFF4F6F8),
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||
onPressed: () => context.pop(),
|
||||
),
|
||||
title: const Text(
|
||||
@@ -192,7 +193,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
actions: [
|
||||
// Share button
|
||||
IconButton(
|
||||
icon: const Icon(Icons.share, color: Colors.black),
|
||||
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
|
||||
onPressed: () {
|
||||
productAsync.whenData((product) {
|
||||
_shareProduct(product);
|
||||
@@ -202,7 +203,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
// Favorite button
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
isFavorite ? Icons.favorite : Icons.favorite_border,
|
||||
isFavorite ? FontAwesomeIcons.solidHeart : FontAwesomeIcons.heart,
|
||||
color: isFavorite ? AppColors.danger : Colors.black,
|
||||
),
|
||||
onPressed: _toggleFavorite,
|
||||
@@ -265,7 +266,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.error_outline,
|
||||
FontAwesomeIcons.circleExclamation,
|
||||
size: 80,
|
||||
color: AppColors.danger,
|
||||
),
|
||||
@@ -290,7 +291,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
// Invalidate to trigger refetch
|
||||
ref.invalidate(productDetailProvider(productId: widget.productId));
|
||||
},
|
||||
icon: const Icon(Icons.refresh),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowsRotate, size: 18),
|
||||
label: const Text('Thử lại'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primaryBlue,
|
||||
|
||||
@@ -5,6 +5,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/router/app_router.dart';
|
||||
@@ -45,7 +46,7 @@ class ProductsPage extends ConsumerWidget {
|
||||
endDrawer: const ProductFilterDrawer(),
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||
onPressed: () => context.pop(),
|
||||
),
|
||||
title: const Text('Sản phẩm', style: TextStyle(color: Colors.black)),
|
||||
@@ -61,7 +62,7 @@ class ProductsPage extends ConsumerWidget {
|
||||
backgroundColor: AppColors.danger,
|
||||
textColor: AppColors.white,
|
||||
isLabelVisible: cartItemCount > 0,
|
||||
child: const Icon(Icons.shopping_cart_outlined, color: Colors.black),
|
||||
child: const FaIcon(FontAwesomeIcons.cartShopping, color: Colors.black, size: 20),
|
||||
),
|
||||
onPressed: () => context.push(RouteNames.cart),
|
||||
),
|
||||
@@ -88,7 +89,7 @@ class ProductsPage extends ConsumerWidget {
|
||||
// Open filter drawer from right
|
||||
Scaffold.of(scaffoldContext).openEndDrawer();
|
||||
},
|
||||
icon: const Icon(Icons.filter_list, size: 20),
|
||||
icon: const FaIcon(FontAwesomeIcons.sliders, size: 18),
|
||||
label: const Text('Lọc', style: TextStyle(fontSize: 12)),
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: AppColors.grey900,
|
||||
@@ -160,7 +161,7 @@ class ProductsPage extends ConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.inventory_2_outlined, size: 80.0, color: AppColors.grey500.withAlpha(128)),
|
||||
FaIcon(FontAwesomeIcons.boxOpen, size: 80.0, color: AppColors.grey500.withAlpha(128)),
|
||||
const SizedBox(height: AppSpacing.lg),
|
||||
Text(
|
||||
l10n.noProductsFound,
|
||||
@@ -186,7 +187,7 @@ class ProductsPage extends ConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.error_outline, size: 80.0, color: AppColors.danger.withAlpha(128)),
|
||||
FaIcon(FontAwesomeIcons.circleExclamation, size: 80.0, color: AppColors.danger.withAlpha(128)),
|
||||
const SizedBox(height: AppSpacing.lg),
|
||||
Text(
|
||||
l10n.error,
|
||||
@@ -203,7 +204,7 @@ class ProductsPage extends ConsumerWidget {
|
||||
onPressed: () async {
|
||||
await ref.read(productsProvider.notifier).refresh();
|
||||
},
|
||||
icon: const Icon(Icons.refresh),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowsRotate, size: 18),
|
||||
label: Text(l10n.tryAgain),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primaryBlue,
|
||||
|
||||
@@ -6,6 +6,7 @@ library;
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
@@ -75,7 +76,7 @@ class ProductCard extends ConsumerWidget {
|
||||
errorWidget: (context, url, error) => Container(
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_not_supported,
|
||||
FontAwesomeIcons.image,
|
||||
size: 48.0,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -254,7 +255,7 @@ class ProductCard extends ConsumerWidget {
|
||||
horizontal: AppSpacing.sm,
|
||||
),
|
||||
),
|
||||
icon: const Icon(Icons.shopping_cart, size: 16.0),
|
||||
icon: const FaIcon(FontAwesomeIcons.cartShopping, size: 14.0),
|
||||
label: Text(
|
||||
!product.inStock ? 'Thêm vào giỏ' : l10n.outOfStock,
|
||||
style: const TextStyle(
|
||||
@@ -299,7 +300,7 @@ class ProductCard extends ConsumerWidget {
|
||||
horizontal: AppSpacing.sm,
|
||||
),
|
||||
),
|
||||
icon: const Icon(Icons.threed_rotation, size: 16.0),
|
||||
icon: const FaIcon(FontAwesomeIcons.cube, size: 14.0),
|
||||
label: const Text(
|
||||
'Phối cảnh 360°',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -5,6 +5,7 @@ library;
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
@@ -108,7 +109,7 @@ class _ImageGallerySectionState extends State<ImageGallerySection> {
|
||||
errorWidget: (context, url, error) => Container(
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_not_supported,
|
||||
FontAwesomeIcons.image,
|
||||
size: 64,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -144,7 +145,7 @@ class _ImageGallerySectionState extends State<ImageGallerySection> {
|
||||
return Transform.rotate(
|
||||
angle: value * 2 * 3.14159,
|
||||
child: const Icon(
|
||||
Icons.sync,
|
||||
FontAwesomeIcons.arrowsRotate,
|
||||
size: 10,
|
||||
color: AppColors.white,
|
||||
),
|
||||
@@ -234,7 +235,7 @@ class _ImageGallerySectionState extends State<ImageGallerySection> {
|
||||
errorWidget: (context, url, error) => Container(
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_not_supported,
|
||||
FontAwesomeIcons.image,
|
||||
size: 20,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -312,7 +313,7 @@ class _ImageLightboxState extends State<_ImageLightbox> {
|
||||
foregroundColor: AppColors.white,
|
||||
elevation: 0,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.close, size: 32),
|
||||
icon: const FaIcon(FontAwesomeIcons.xmark, size: 28),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
title: Text(
|
||||
@@ -340,7 +341,7 @@ class _ImageLightboxState extends State<_ImageLightbox> {
|
||||
imageUrl: widget.images[index],
|
||||
fit: BoxFit.contain,
|
||||
errorWidget: (context, url, error) => const Icon(
|
||||
Icons.error_outline,
|
||||
FontAwesomeIcons.circleExclamation,
|
||||
color: AppColors.white,
|
||||
size: 64,
|
||||
),
|
||||
@@ -361,7 +362,7 @@ class _ImageLightboxState extends State<_ImageLightbox> {
|
||||
child: Center(
|
||||
child: IconButton(
|
||||
icon: const Icon(
|
||||
Icons.chevron_left,
|
||||
FontAwesomeIcons.chevronLeft,
|
||||
color: AppColors.white,
|
||||
size: 32,
|
||||
),
|
||||
@@ -382,7 +383,7 @@ class _ImageLightboxState extends State<_ImageLightbox> {
|
||||
child: Center(
|
||||
child: IconButton(
|
||||
icon: const Icon(
|
||||
Icons.chevron_right,
|
||||
FontAwesomeIcons.chevronRight,
|
||||
color: AppColors.white,
|
||||
size: 32,
|
||||
),
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
import 'package:worker/features/products/domain/entities/product.dart';
|
||||
@@ -152,7 +153,7 @@ class _DescriptionTab extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.check_circle,
|
||||
FontAwesomeIcons.circleCheck,
|
||||
size: 18,
|
||||
color: AppColors.success,
|
||||
),
|
||||
@@ -328,7 +329,7 @@ class _ReviewsTab extends StatelessWidget {
|
||||
children: List.generate(
|
||||
5,
|
||||
(index) => Icon(
|
||||
index < 4 ? Icons.star : Icons.star_half,
|
||||
index < 4 ? FontAwesomeIcons.solidStar : FontAwesomeIcons.starHalfStroke,
|
||||
color: const Color(0xFFffc107),
|
||||
size: 18,
|
||||
),
|
||||
@@ -387,7 +388,7 @@ class _ReviewItem extends StatelessWidget {
|
||||
color: Color(0xFFF4F6F8),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.person,
|
||||
FontAwesomeIcons.solidUser,
|
||||
color: AppColors.grey500,
|
||||
size: 20,
|
||||
),
|
||||
@@ -428,8 +429,8 @@ class _ReviewItem extends StatelessWidget {
|
||||
5,
|
||||
(index) => Icon(
|
||||
index < (review['rating'] as num? ?? 0).toInt()
|
||||
? Icons.star
|
||||
: Icons.star_border,
|
||||
? FontAwesomeIcons.solidStar
|
||||
: FontAwesomeIcons.star,
|
||||
color: const Color(0xFFffc107),
|
||||
size: 14,
|
||||
),
|
||||
|
||||
@@ -5,6 +5,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
|
||||
@@ -89,7 +90,7 @@ class StickyActionBar extends StatelessWidget {
|
||||
children: [
|
||||
// Decrease Button
|
||||
_QuantityButton(
|
||||
icon: Icons.remove,
|
||||
icon: FontAwesomeIcons.minus,
|
||||
onPressed: quantity > 1 ? onDecrease : null,
|
||||
),
|
||||
|
||||
@@ -122,7 +123,7 @@ class StickyActionBar extends StatelessWidget {
|
||||
),
|
||||
|
||||
// Increase Button
|
||||
_QuantityButton(icon: Icons.add, onPressed: onIncrease),
|
||||
_QuantityButton(icon: FontAwesomeIcons.plus, onPressed: onIncrease),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -160,7 +161,7 @@ class StickyActionBar extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
icon: const Icon(Icons.shopping_cart, size: 20),
|
||||
icon: const FaIcon(FontAwesomeIcons.cartShopping, size: 18),
|
||||
label: Text(
|
||||
isOutOfStock ? 'Hết hàng' : 'Thêm vào giỏ hàng',
|
||||
style: const TextStyle(
|
||||
|
||||
@@ -5,6 +5,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
import 'package:worker/features/products/presentation/providers/product_filters_provider.dart';
|
||||
@@ -51,7 +52,7 @@ class ProductFilterDrawer extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close),
|
||||
icon: const FaIcon(FontAwesomeIcons.xmark, size: 20),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -208,7 +209,7 @@ class ProductFilterDrawer extends ConsumerWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.error_outline,
|
||||
FontAwesomeIcons.circleExclamation,
|
||||
size: 48,
|
||||
color: AppColors.danger,
|
||||
),
|
||||
|
||||
@@ -5,6 +5,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
import 'package:worker/features/products/presentation/providers/search_query_provider.dart';
|
||||
@@ -67,14 +68,14 @@ class _ProductSearchBarState extends ConsumerState<ProductSearchBar> {
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
prefixIcon: const Icon(
|
||||
Icons.search,
|
||||
FontAwesomeIcons.magnifyingGlass,
|
||||
color: AppColors.grey500,
|
||||
size: AppIconSize.md,
|
||||
),
|
||||
suffixIcon: _controller.text.isNotEmpty
|
||||
? IconButton(
|
||||
icon: const Icon(
|
||||
Icons.clear,
|
||||
FontAwesomeIcons.xmark,
|
||||
color: AppColors.grey500,
|
||||
size: AppIconSize.md,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user