refactor: update package name and application ID to 'com.marco.aiot'; comment out Firebase-related code
This commit is contained in:
parent
5977fef261
commit
35a0228cbe
@ -15,7 +15,7 @@ if (keystorePropertiesFile.exists()) {
|
||||
|
||||
android {
|
||||
// Define the namespace for your Android application
|
||||
namespace = "com.marco.aiotstage"
|
||||
namespace = "com.marco.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.aiotstage"
|
||||
applicationId = "com.marco.aiot"
|
||||
// Set minimum and target SDK versions based on Flutter's configuration
|
||||
minSdk = 23
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
|
@ -9,7 +9,7 @@
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:626581282477:android:8d3cf5009ff92ef67ff024",
|
||||
"android_client_info": {
|
||||
"package_name": "com.marco.aiotstage"
|
||||
"package_name": "com.marco.aiot"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
|
@ -7,10 +7,8 @@
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
|
||||
|
||||
<application
|
||||
android:label="Marco_Stage"
|
||||
android:label="Marco"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.marco.aiotstage
|
||||
package com.marco.aiot
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
|
@ -368,7 +368,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -76,7 +76,8 @@ class LoginController extends MyController {
|
||||
} else {
|
||||
await _handleRememberMe();
|
||||
|
||||
// ✅ After login success → register saved FCM token with server
|
||||
// ✅ Commented out FCM token registration after login
|
||||
/*
|
||||
final fcmToken = await LocalStorage.getFcmToken();
|
||||
if (fcmToken?.isNotEmpty ?? false) {
|
||||
final success = await AuthService.registerDeviceToken(fcmToken!);
|
||||
@ -86,6 +87,7 @@ class LoginController extends MyController {
|
||||
: "⚠️ Failed to register FCM token after login.",
|
||||
level: LogLevel.warning);
|
||||
}
|
||||
*/
|
||||
|
||||
logSafe("Login successful for user: ${loginData['username']}");
|
||||
Get.toNamed('/home');
|
||||
|
@ -6,7 +6,7 @@ import 'package:marco/helpers/widgets/my_form_validator.dart';
|
||||
import 'package:marco/helpers/widgets/my_snackbar.dart';
|
||||
import 'package:marco/view/dashboard/dashboard_screen.dart';
|
||||
import 'package:marco/helpers/services/app_logger.dart';
|
||||
import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart';
|
||||
// import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart'; // 🔴 Commented out
|
||||
|
||||
class MPINController extends GetxController {
|
||||
final MyFormValidator basicValidator = MyFormValidator();
|
||||
@ -256,13 +256,14 @@ class MPINController extends GetxController {
|
||||
try {
|
||||
isLoading.value = true;
|
||||
|
||||
// ✅ Fetch FCM Token here
|
||||
final fcmToken = await FirebaseNotificationService().getFcmToken();
|
||||
// ✅ Fetch FCM Token here (DISABLED)
|
||||
// final fcmToken = await FirebaseNotificationService().getFcmToken();
|
||||
|
||||
final response = await AuthService.verifyMpin(
|
||||
mpin: enteredMPIN,
|
||||
mpinToken: mpinToken,
|
||||
fcmToken: fcmToken ?? '',
|
||||
// fcmToken: fcmToken ?? '', // 🔴 Commented out
|
||||
fcmToken: '', // ✅ Passing empty string instead
|
||||
);
|
||||
|
||||
isLoading.value = false;
|
||||
|
@ -1,6 +1,6 @@
|
||||
class ApiEndpoints {
|
||||
static const String baseUrl = "https://stageapi.marcoaiot.com/api";
|
||||
// static const String baseUrl = "https://api.marcoaiot.com/api";
|
||||
// static const String baseUrl = "https://stageapi.marcoaiot.com/api";
|
||||
static const String baseUrl = "https://api.marcoaiot.com/api";
|
||||
|
||||
// Dashboard Module API Endpoints
|
||||
static const String getDashboardAttendanceOverview = "/dashboard/attendance-overview";
|
||||
|
@ -2,14 +2,14 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:url_strategy/url_strategy.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
// import 'package:firebase_core/firebase_core.dart'; // ❌ Commented out Firebase
|
||||
|
||||
import 'package:marco/controller/permission_controller.dart';
|
||||
import 'package:marco/controller/project_controller.dart';
|
||||
import 'package:marco/helpers/services/storage/local_storage.dart';
|
||||
import 'package:marco/helpers/services/app_logger.dart';
|
||||
import 'package:marco/helpers/services/auth_service.dart';
|
||||
import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart';
|
||||
// import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart'; // ❌ Commented out FCM
|
||||
import 'package:marco/helpers/services/device_info_service.dart';
|
||||
import 'package:marco/helpers/theme/theme_customizer.dart';
|
||||
import 'package:marco/helpers/theme/app_theme.dart';
|
||||
@ -20,7 +20,7 @@ Future<void> initializeApp() async {
|
||||
|
||||
await Future.wait([
|
||||
_setupUI(),
|
||||
_setupFirebase(),
|
||||
// _setupFirebase(), // ❌ Commented out Firebase init
|
||||
_setupLocalStorage(),
|
||||
]);
|
||||
|
||||
@ -28,7 +28,7 @@ Future<void> initializeApp() async {
|
||||
await _handleAuthTokens();
|
||||
await _setupTheme();
|
||||
await _setupControllers();
|
||||
await _setupFirebaseMessaging();
|
||||
// await _setupFirebaseMessaging(); // ❌ Commented out FCM init
|
||||
|
||||
_finalizeAppStyle();
|
||||
|
||||
@ -56,10 +56,13 @@ Future<void> _setupUI() async {
|
||||
logSafe("💡 UI setup completed.");
|
||||
}
|
||||
|
||||
// ❌ Commented out Firebase setup
|
||||
/*
|
||||
Future<void> _setupFirebase() async {
|
||||
await Firebase.initializeApp();
|
||||
logSafe("💡 Firebase initialized.");
|
||||
}
|
||||
*/
|
||||
|
||||
Future<void> _setupLocalStorage() async {
|
||||
await LocalStorage.init();
|
||||
@ -114,10 +117,13 @@ Future<void> _setupControllers() async {
|
||||
]);
|
||||
}
|
||||
|
||||
// ❌ Commented out Firebase Messaging setup
|
||||
/*
|
||||
Future<void> _setupFirebaseMessaging() async {
|
||||
await FirebaseNotificationService().initialize();
|
||||
logSafe("💡 Firebase Messaging initialized.");
|
||||
}
|
||||
*/
|
||||
|
||||
void _finalizeAppStyle() {
|
||||
AppStyle.init();
|
||||
|
@ -11,7 +11,7 @@ import 'package:marco/helpers/widgets/my_spacing.dart';
|
||||
import 'package:marco/helpers/widgets/my_text.dart';
|
||||
import 'package:marco/view/dashboard/dashboard_chart.dart';
|
||||
import 'package:marco/view/layouts/layout.dart';
|
||||
import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart';
|
||||
// import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart'; // ❌ Commented out
|
||||
|
||||
class DashboardScreen extends StatefulWidget {
|
||||
const DashboardScreen({super.key});
|
||||
@ -55,6 +55,8 @@ class _DashboardScreenState extends State<DashboardScreen> with UIMixin {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// ❌ Commented out FCM Test Button
|
||||
/*
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
final fcmService = FirebaseNotificationService();
|
||||
@ -66,6 +68,7 @@ class _DashboardScreenState extends State<DashboardScreen> with UIMixin {
|
||||
child: const Text("Send Test Notification"),
|
||||
),
|
||||
MySpacing.height(10),
|
||||
*/
|
||||
_buildDashboardStats(context),
|
||||
MySpacing.height(24),
|
||||
_buildAttendanceChartSection(),
|
||||
|
@ -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.aiotstage")
|
||||
set(APPLICATION_ID "com.marco.aiot")
|
||||
|
||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||
# versions of CMake.
|
||||
|
@ -385,7 +385,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.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.aiotstage.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
||||
|
@ -8,7 +8,7 @@
|
||||
PRODUCT_NAME = marco
|
||||
|
||||
// The application's bundle identifier
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot
|
||||
|
||||
// The copyright displayed in application information
|
||||
PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
|
||||
|
@ -16,7 +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+6
|
||||
version: 1.0.0+7
|
||||
|
||||
environment:
|
||||
sdk: ^3.5.3
|
||||
|
@ -13,7 +13,7 @@ import 'package:marco/main.dart';
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(const MyApp());
|
||||
await tester.pumpWidget(const MainWrapper());
|
||||
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
|
Loading…
x
Reference in New Issue
Block a user