change package

This commit is contained in:
Phuoc Nguyen
2025-11-11 10:48:18 +07:00
parent 4e40a52b84
commit 47cdf71968
8 changed files with 48 additions and 90 deletions

View File

@@ -6,7 +6,7 @@ plugins {
}
android {
namespace = "com.example.worker"
namespace = "com.dbiz.partner"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
@@ -21,7 +21,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.worker"
applicationId = "com.dbiz.partner"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion

View File

@@ -1,4 +1,4 @@
package com.example.worker
package com.dbiz.partner
import io.flutter.embedding.android.FlutterActivity

View File

@@ -152,7 +152,6 @@
01651DC8E3A322D39483596C /* Pods-RunnerTests.release.xcconfig */,
18121E1016DEC4038E74F1F0 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
@@ -489,14 +488,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = W759YCT9DM;
DEVELOPMENT_TEAM = 9R5X2DM2C8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.worker;
PRODUCT_BUNDLE_IDENTIFIER = com.dbiz.partner;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -513,7 +512,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.worker.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.dbiz.partner.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -531,7 +530,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.worker.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.dbiz.partner.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -547,7 +546,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.worker.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.dbiz.partner.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -672,14 +671,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = W759YCT9DM;
DEVELOPMENT_TEAM = 9R5X2DM2C8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.worker;
PRODUCT_BUNDLE_IDENTIFIER = com.dbiz.partner;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -695,14 +694,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = W759YCT9DM;
DEVELOPMENT_TEAM = 9R5X2DM2C8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.worker;
PRODUCT_BUNDLE_IDENTIFIER = com.dbiz.partner;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;

View File

@@ -25,7 +25,7 @@ class WorkerApp extends ConsumerWidget {
return MaterialApp.router(
// ==================== App Configuration ====================
debugShowCheckedModeBanner: false,
title: 'Worker App',
title: 'DBIZ Partner',
// ==================== Router Configuration ====================
// Using go_router for declarative routing with deep linking support

View File

@@ -57,10 +57,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 Icon(Icons.shopping_cart_outlined, color: Colors.black),
),
onPressed: () => context.push(RouteNames.cart),
),
@@ -77,9 +74,7 @@ class ProductsPage extends ConsumerWidget {
child: Row(
children: [
// Search Bar (Expanded)
const Expanded(
child: ProductSearchBar(),
),
const Expanded(child: ProductSearchBar()),
const SizedBox(width: 8),
// Filter Button
SizedBox(
@@ -90,25 +85,14 @@ class ProductsPage extends ConsumerWidget {
Scaffold.of(scaffoldContext).openEndDrawer();
},
icon: const Icon(Icons.filter_list, size: 20),
label: const Text(
'Lọc',
style: TextStyle(fontSize: 12),
),
label: const Text('Lọc', style: TextStyle(fontSize: 12)),
style: OutlinedButton.styleFrom(
foregroundColor: AppColors.grey900,
side: const BorderSide(
color: AppColors.white,
width: 0,
),
side: const BorderSide(color: AppColors.white, width: 0),
backgroundColor: AppColors.white,
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
InputFieldSpecs.borderRadius,
),
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
),
),
),
@@ -117,15 +101,13 @@ class ProductsPage extends ConsumerWidget {
),
),
// Category Filter Chips
categoriesAsync.when(
data: (categories) => CategoryFilterChips(categories: categories),
loading: () => const SizedBox(
height: 48.0,
child: Center(child: CircularProgressIndicator(strokeWidth: 2.0)),
),
error: (error, stack) => const SizedBox.shrink(),
),
// Category Filter Chips
categoriesAsync.when(
data: (categories) => CategoryFilterChips(categories: categories),
loading: () =>
const SizedBox(height: 48.0, child: Center(child: CircularProgressIndicator(strokeWidth: 2.0))),
error: (error, stack) => const SizedBox.shrink(),
),
const SizedBox(height: AppSpacing.sm),
@@ -149,21 +131,16 @@ class ProductsPage extends ConsumerWidget {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content:
Text('${product.name} đã thêm vào giỏ hàng'),
content: Text('${product.name} đã thêm vào giỏ hàng'),
duration: const Duration(seconds: 2),
action: SnackBarAction(
label: 'Xem',
onPressed: () => context.go(RouteNames.cart),
),
action: SnackBarAction(label: 'Xem', onPressed: () => context.go(RouteNames.cart)),
),
);
},
);
},
loading: () => _buildLoadingState(),
error: (error, stack) =>
_buildErrorState(context, l10n, error, ref),
error: (error, stack) => _buildErrorState(context, l10n, error, ref),
),
),
],
@@ -179,25 +156,14 @@ class ProductsPage extends ConsumerWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.inventory_2_outlined,
size: 80.0,
color: AppColors.grey500.withAlpha(128),
),
Icon(Icons.inventory_2_outlined, size: 80.0, color: AppColors.grey500.withAlpha(128)),
const SizedBox(height: AppSpacing.lg),
Text(
l10n.noProductsFound,
style: const TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: AppColors.grey900,
),
style: const TextStyle(fontSize: 18.0, fontWeight: FontWeight.w500, color: AppColors.grey900),
),
const SizedBox(height: AppSpacing.sm),
Text(
l10n.noResults,
style: const TextStyle(fontSize: 14.0, color: AppColors.grey500),
),
Text(l10n.noResults, style: const TextStyle(fontSize: 14.0, color: AppColors.grey500)),
],
),
);
@@ -205,37 +171,22 @@ class ProductsPage extends ConsumerWidget {
/// Build loading state
Widget _buildLoadingState() {
return const Center(
child: CircularProgressIndicator(color: AppColors.primaryBlue),
);
return const Center(child: CircularProgressIndicator(color: AppColors.primaryBlue));
}
/// Build error state
Widget _buildErrorState(
BuildContext context,
AppLocalizations l10n,
Object error,
WidgetRef ref,
) {
Widget _buildErrorState(BuildContext context, AppLocalizations l10n, Object error, WidgetRef ref) {
return Center(
child: Padding(
padding: const EdgeInsets.all(AppSpacing.xl),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.error_outline,
size: 80.0,
color: AppColors.danger.withAlpha(128),
),
Icon(Icons.error_outline, size: 80.0, color: AppColors.danger.withAlpha(128)),
const SizedBox(height: AppSpacing.lg),
Text(
l10n.error,
style: const TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w600,
color: AppColors.grey900,
),
style: const TextStyle(fontSize: 18.0, fontWeight: FontWeight.w600, color: AppColors.grey900),
),
const SizedBox(height: AppSpacing.sm),
Text(
@@ -253,10 +204,7 @@ class ProductsPage extends ConsumerWidget {
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primaryBlue,
foregroundColor: AppColors.white,
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.lg,
vertical: AppSpacing.md,
),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.lg, vertical: AppSpacing.md),
),
),
],

View File

@@ -42,6 +42,7 @@ class ProductCard extends ConsumerWidget {
return Card(
elevation: ProductCardSpecs.elevation,
margin: const EdgeInsets.all(8),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(ProductCardSpecs.borderRadius),
),

View File

@@ -153,6 +153,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
change_app_package_name:
dependency: "direct dev"
description:
name: change_app_package_name
sha256: "8e43b754fe960426904d77ed4c62fa8c9834deaf6e293ae40963fa447482c4c5"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
characters:
dependency: transitive
description:

View File

@@ -73,6 +73,7 @@ dependencies:
shared_preferences: ^2.2.3
flutter_secure_storage: ^9.2.4
# Navigation
go_router: ^14.6.2
@@ -94,6 +95,7 @@ dev_dependencies:
# Linting
flutter_lints: ^5.0.0
change_app_package_name: ^1.5.0
# Testing
mockito: ^5.4.4