From 618ac6f27a85f056df793fb9ae09cedf6a372670 Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Mon, 17 Nov 2025 20:17:14 +0530 Subject: [PATCH] chore: update package name and bundle identifier to com.marcoonfieldwork.aiot --- android/app/build.gradle | 4 +- android/app/google-services.json | 2 +- .../com/example/maxdash/MainActivity.kt | 2 +- ios/Runner.xcodeproj/project.pbxproj | 12 ++--- lib/model/expense/expense_detail_model.dart | 52 ++++++------------- linux/CMakeLists.txt | 2 +- macos/Runner.xcodeproj/project.pbxproj | 6 +-- macos/Runner/Configs/AppInfo.xcconfig | 2 +- pubspec.yaml | 3 +- 9 files changed, 31 insertions(+), 54 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index efbe5d9..23b8b74 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -15,7 +15,7 @@ if (keystorePropertiesFile.exists()) { android { // Define the namespace for your Android application - namespace = "com.marco.aiot" + namespace = "com.marcoonfieldwork.aiot" // Set the compile SDK version based on Flutter's configuration compileSdk = flutter.compileSdkVersion // Set the NDK version based on Flutter's configuration @@ -37,7 +37,7 @@ android { // Default configuration for your application defaultConfig { // Specify your unique Application ID. This identifies your app on Google Play. - applicationId = "com.marco.aiot" + applicationId = "com.marcoonfieldwork.aiot" // Set minimum and target SDK versions based on Flutter's configuration minSdk = 23 targetSdk = flutter.targetSdkVersion diff --git a/android/app/google-services.json b/android/app/google-services.json index e1ce769..63ab605 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -9,7 +9,7 @@ "client_info": { "mobilesdk_app_id": "1:626581282477:android:8d3cf5009ff92ef67ff024", "android_client_info": { - "package_name": "com.marco.aiot" + "package_name": "com.marcoonfieldwork.aiot" } }, "oauth_client": [], diff --git a/android/app/src/main/kotlin/com/example/maxdash/MainActivity.kt b/android/app/src/main/kotlin/com/example/maxdash/MainActivity.kt index 629b9af..072f2a5 100644 --- a/android/app/src/main/kotlin/com/example/maxdash/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/maxdash/MainActivity.kt @@ -1,4 +1,4 @@ -package com.marco.aiot +package com.marcoonfieldwork.aiot import io.flutter.embedding.android.FlutterActivity diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 438e434..aec584f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -368,7 +368,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -384,7 +384,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -401,7 +401,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -416,7 +416,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -547,7 +547,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -569,7 +569,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/lib/model/expense/expense_detail_model.dart b/lib/model/expense/expense_detail_model.dart index 492e357..116205e 100644 --- a/lib/model/expense/expense_detail_model.dart +++ b/lib/model/expense/expense_detail_model.dart @@ -1,3 +1,4 @@ +// ---------------- ExpenseDetailModel ---------------- class ExpenseDetailModel { final String id; final Project project; @@ -23,7 +24,7 @@ class ExpenseDetailModel { final String? gstNumber; final int noOfPersons; final bool isActive; - final dynamic expensesReimburse; // can be replaced with model later + final dynamic expensesReimburse; ExpenseDetailModel({ required this.id, @@ -56,51 +57,30 @@ class ExpenseDetailModel { factory ExpenseDetailModel.fromJson(Map json) { return ExpenseDetailModel( id: json['id'] ?? '', - project: json['project'] != null - ? Project.fromJson(json['project']) - : Project.empty(), + project: json['project'] != null ? Project.fromJson(json['project']) : Project.empty(), expensesType: json['expensesType'] != null ? ExpensesType.fromJson(json['expensesType']) : ExpensesType.empty(), paymentMode: json['paymentMode'] != null ? PaymentMode.fromJson(json['paymentMode']) : PaymentMode.empty(), - paidBy: json['paidBy'] != null - ? Person.fromJson(json['paidBy']) - : Person.empty(), - createdBy: json['createdBy'] != null - ? Person.fromJson(json['createdBy']) - : Person.empty(), - reviewedBy: - json['reviewedBy'] != null ? Person.fromJson(json['reviewedBy']) : null, - approvedBy: - json['approvedBy'] != null ? Person.fromJson(json['approvedBy']) : null, - processedBy: json['processedBy'] != null - ? Person.fromJson(json['processedBy']) - : null, + paidBy: json['paidBy'] != null ? Person.fromJson(json['paidBy']) : Person.empty(), + createdBy: json['createdBy'] != null ? Person.fromJson(json['createdBy']) : Person.empty(), + reviewedBy: json['reviewedBy'] != null ? Person.fromJson(json['reviewedBy']) : null, + approvedBy: json['approvedBy'] != null ? Person.fromJson(json['approvedBy']) : null, + processedBy: json['processedBy'] != null ? Person.fromJson(json['processedBy']) : null, transactionDate: json['transactionDate'] ?? '', createdAt: json['createdAt'] ?? '', supplerName: json['supplerName'] ?? '', amount: (json['amount'] as num?)?.toDouble() ?? 0.0, - status: json['status'] != null - ? ExpenseStatus.fromJson(json['status']) - : ExpenseStatus.empty(), - nextStatus: (json['nextStatus'] as List?) - ?.map((e) => ExpenseStatus.fromJson(e)) - .toList() ?? - [], + status: json['status'] != null ? ExpenseStatus.fromJson(json['status']) : ExpenseStatus.empty(), + nextStatus: (json['nextStatus'] as List?)?.map((e) => ExpenseStatus.fromJson(e)).toList() ?? [], preApproved: json['preApproved'] ?? false, transactionId: json['transactionId'] ?? '', description: json['description'] ?? '', location: json['location'] ?? '', - documents: (json['documents'] as List?) - ?.map((e) => ExpenseDocument.fromJson(e)) - .toList() ?? - [], - expenseLogs: (json['expenseLogs'] as List?) - ?.map((e) => ExpenseLog.fromJson(e)) - .toList() ?? - [], + documents: (json['documents'] as List?)?.map((e) => ExpenseDocument.fromJson(e)).toList() ?? [], + expenseLogs: (json['expenseLogs'] as List?)?.map((e) => ExpenseLog.fromJson(e)).toList() ?? [], gstNumber: json['gstNumber']?.toString(), noOfPersons: json['noOfPersons'] ?? 0, isActive: json['isActive'] ?? true, @@ -259,7 +239,7 @@ class ExpenseStatus { final String name; final String displayName; final String description; - final String? permissionIds; // API sends list, but can stringify + final String? permissionIds; final String color; final bool isSystem; @@ -268,7 +248,7 @@ class ExpenseStatus { required this.name, required this.displayName, required this.description, - required this.permissionIds, + this.permissionIds, required this.color, required this.isSystem, }); @@ -342,9 +322,7 @@ class ExpenseLog { factory ExpenseLog.fromJson(Map json) { return ExpenseLog( id: json['id'] ?? '', - updatedBy: json['updatedBy'] != null - ? Person.fromJson(json['updatedBy']) - : Person.empty(), + updatedBy: json['updatedBy'] != null ? Person.fromJson(json['updatedBy']) : Person.empty(), action: json['action'] ?? '', updateAt: json['updateAt'] ?? '', comment: json['comment'] ?? '', diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index b0b5577..fa2be66 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX) set(BINARY_NAME "marco") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.marco.aiot") +set(APPLICATION_ID "com.marcoonfieldwork.aiot") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index cc7ae89..a89772a 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -385,7 +385,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco"; @@ -399,7 +399,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco"; @@ -413,7 +413,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco"; diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index 39359c4..52293a5 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -8,7 +8,7 @@ PRODUCT_NAME = marco // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot +PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot // The copyright displayed in application information PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/pubspec.yaml b/pubspec.yaml index 538d0e8..59cdd11 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,8 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+7 - +version: 1.0.0+13 environment: sdk: ^3.5.3