should have push notifs as well as Battery SOC monitoring
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
// START: FlutterFire Configuration
|
||||
id("com.google.gms.google-services")
|
||||
// END: FlutterFire Configuration
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
|
||||
29
android/app/google-services.json
Normal file
29
android/app/google-services.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "956683546941",
|
||||
"project_id": "blindmaster-54055",
|
||||
"storage_bucket": "blindmaster-54055.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:956683546941:android:828055a1f543b75f121554",
|
||||
"android_client_info": {
|
||||
"package_name": "com.example.blind_master"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBJzL-jeo4xa_rQkHymzku_2lIJ6WJ8hoI"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -19,6 +19,9 @@ pluginManagement {
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.7.0" apply false
|
||||
// START: FlutterFire Configuration
|
||||
id("com.google.gms.google-services") version("4.3.15") apply false
|
||||
// END: FlutterFire Configuration
|
||||
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
|
||||
}
|
||||
|
||||
|
||||
1
firebase.json
Normal file
1
firebase.json
Normal file
@@ -0,0 +1 @@
|
||||
{"flutter":{"platforms":{"android":{"default":{"projectId":"blindmaster-54055","appId":"1:956683546941:android:828055a1f543b75f121554","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"blindmaster-54055","appId":"1:956683546941:ios:162a6b8aa58f1eb8121554","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"macos":{"default":{"projectId":"blindmaster-54055","appId":"1:956683546941:ios:162a6b8aa58f1eb8121554","uploadDebugSymbols":false,"fileOutput":"macos/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"blindmaster-54055","configurations":{"android":"1:956683546941:android:828055a1f543b75f121554","ios":"1:956683546941:ios:162a6b8aa58f1eb8121554","macos":"1:956683546941:ios:162a6b8aa58f1eb8121554","web":"1:956683546941:web:f66e35806267907c121554","windows":"1:956683546941:web:f5d94d05b6ce6bef121554"}}}}}}
|
||||
@@ -11,6 +11,7 @@
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
37168F2E6E0EB2FD2E2670EA /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76A4A76AA7A29FE3F7CE6A5 /* Pods_RunnerTests.framework */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
594276F4616D1396DBF5D0C1 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 86D2D4E2E379E6C7A77A04E3 /* GoogleService-Info.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
@@ -52,6 +53,7 @@
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
86D2D4E2E379E6C7A77A04E3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97606C416DE8FC726A943531 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
@@ -115,6 +117,7 @@
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
FB2136F1EB4879FFCA098756 /* Pods */,
|
||||
AAE1A6D2DD25E745E39CFD95 /* Frameworks */,
|
||||
86D2D4E2E379E6C7A77A04E3 /* GoogleService-Info.plist */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -264,6 +267,7 @@
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
594276F4616D1396DBF5D0C1 /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
30
ios/Runner/GoogleService-Info.plist
Normal file
30
ios/Runner/GoogleService-Info.plist
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyC0MWniqI8flETaT8zKwXQzBhYRljKIKvk</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>956683546941</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.example.blindMaster</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>blindmaster-54055</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>blindmaster-54055.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:956683546941:ios:162a6b8aa58f1eb8121554</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -54,6 +54,11 @@
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
|
||||
<key>NSLocalNetworkUsageDescription</key>
|
||||
<string>Allow the app to find and connect to the Dart VM for debugging purposes.</string>
|
||||
|
||||
18
lib/BlindMasterResources/fcm_service.dart
Normal file
18
lib/BlindMasterResources/fcm_service.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:blind_master/BlindMasterResources/secure_transmissions.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
|
||||
class FcmService {
|
||||
/// Request permission, fetch the FCM token, and register it with the server.
|
||||
/// Safe to call on every login/session-restore — the server just upserts the value.
|
||||
static Future<void> register() async {
|
||||
try {
|
||||
final messaging = FirebaseMessaging.instance;
|
||||
await messaging.requestPermission(alert: true, badge: true, sound: true);
|
||||
final token = await messaging.getToken();
|
||||
if (token == null) return;
|
||||
await securePost({'token': token}, 'register_fcm_token');
|
||||
} catch (_) {
|
||||
// Non-fatal — push notifications simply won't work until the next successful registration.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:blind_master/BlindMasterResources/fcm_service.dart';
|
||||
import 'package:blind_master/BlindMasterResources/secure_transmissions.dart';
|
||||
import 'package:blind_master/BlindMasterScreens/Startup/create_user_screen.dart';
|
||||
import 'package:blind_master/BlindMasterScreens/Startup/forgot_password_screen.dart';
|
||||
@@ -84,6 +85,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
if (token.isEmpty) throw Exception('Token Not Received');
|
||||
final storage = FlutterSecureStorage();
|
||||
await storage.write(key: 'token', value: token);
|
||||
await FcmService.register();
|
||||
|
||||
} catch(e) {
|
||||
if (!mounted) return;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:blind_master/BlindMasterResources/fcm_service.dart';
|
||||
import 'package:blind_master/BlindMasterResources/secure_transmissions.dart';
|
||||
import 'package:blind_master/BlindMasterScreens/home_screen.dart';
|
||||
import 'package:blind_master/BlindMasterScreens/Startup/login_screen.dart';
|
||||
@@ -50,6 +51,7 @@ class _SplashScreenState extends State<SplashScreen> {
|
||||
}
|
||||
|
||||
nextScreen = HomeScreen();
|
||||
await FcmService.register();
|
||||
} else {
|
||||
nextScreen = LoginScreen();
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ abstract class BaseVerificationWaitingScreenState<T extends BaseVerificationWait
|
||||
child: ListView(
|
||||
physics: AlwaysScrollableScrollPhysics(),
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -24,6 +24,7 @@ class _DeviceScreenState extends State<DeviceScreen> {
|
||||
List occports = [];
|
||||
Widget? peripheralList;
|
||||
String deviceName = "...";
|
||||
int? batterySoc;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -48,6 +49,7 @@ class _DeviceScreenState extends State<DeviceScreen> {
|
||||
final body = json.decode(response.body) as Map<String, dynamic>;
|
||||
setState(() {
|
||||
deviceName = body['device_name'];
|
||||
batterySoc = body['battery_soc'] as int?;
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -355,12 +357,30 @@ class _DeviceScreenState extends State<DeviceScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
deviceName,
|
||||
style: GoogleFonts.aBeeZee(),
|
||||
),
|
||||
title: Text(deviceName, style: GoogleFonts.aBeeZee()),
|
||||
backgroundColor: Theme.of(context).primaryColorLight,
|
||||
foregroundColor: Colors.white,
|
||||
actions: [
|
||||
if (batterySoc != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
batterySoc! <= 10 ? Icons.battery_alert
|
||||
: batterySoc! <= 20 ? Icons.battery_1_bar
|
||||
: batterySoc! <= 40 ? Icons.battery_2_bar
|
||||
: batterySoc! <= 60 ? Icons.battery_3_bar
|
||||
: batterySoc! <= 80 ? Icons.battery_5_bar
|
||||
: Icons.battery_full,
|
||||
color: batterySoc! <= 10 ? Colors.red : Colors.white,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text('$batterySoc%', style: const TextStyle(color: Colors.white)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: peripheralList ?? SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.8,
|
||||
|
||||
@@ -124,6 +124,27 @@ class _PeripheralScreenState extends State<PeripheralScreen> {
|
||||
}
|
||||
});
|
||||
|
||||
socket?.on("battery_alert", (data) {
|
||||
if (data is! Map<String, dynamic>) return;
|
||||
if (data['deviceId'] != widget.deviceId) return;
|
||||
if (!mounted) return;
|
||||
final type = data['type'] as String? ?? '';
|
||||
final soc = data['soc'] as int? ?? 0;
|
||||
final (String message, Color color) = switch (type) {
|
||||
'overvoltage' => ('Battery fault detected. Please check your charger.', Colors.red),
|
||||
'critical_low' => ('Battery critically low ($soc%). Device shutting down.', Colors.red),
|
||||
'low_voltage_warning' => ('Battery voltage dip detected ($soc%). Monitor closely.', Colors.orange),
|
||||
'low_20' => ('Battery low: $soc% remaining. Consider charging soon.', Colors.orange),
|
||||
'low_10' => ('Battery very low: $soc% remaining. Charge now.', Colors.deepOrange),
|
||||
_ => ('Battery alert received ($soc%).', Colors.orange),
|
||||
};
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text(message),
|
||||
backgroundColor: color,
|
||||
duration: const Duration(seconds: 6),
|
||||
));
|
||||
});
|
||||
|
||||
socket?.on("calib", (periphData) {
|
||||
if (periphData is Map<String, dynamic>) {
|
||||
if (periphData['periphID'] == widget.peripheralId) {
|
||||
|
||||
88
lib/firebase_options.dart
Normal file
88
lib/firebase_options.dart
Normal file
@@ -0,0 +1,88 @@
|
||||
// File generated by FlutterFire CLI.
|
||||
// ignore_for_file: type=lint
|
||||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||
import 'package:flutter/foundation.dart'
|
||||
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
||||
|
||||
/// Default [FirebaseOptions] for use with your Firebase apps.
|
||||
///
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// import 'firebase_options.dart';
|
||||
/// // ...
|
||||
/// await Firebase.initializeApp(
|
||||
/// options: DefaultFirebaseOptions.currentPlatform,
|
||||
/// );
|
||||
/// ```
|
||||
class DefaultFirebaseOptions {
|
||||
static FirebaseOptions get currentPlatform {
|
||||
if (kIsWeb) {
|
||||
return web;
|
||||
}
|
||||
switch (defaultTargetPlatform) {
|
||||
case TargetPlatform.android:
|
||||
return android;
|
||||
case TargetPlatform.iOS:
|
||||
return ios;
|
||||
case TargetPlatform.macOS:
|
||||
return macos;
|
||||
case TargetPlatform.windows:
|
||||
return windows;
|
||||
case TargetPlatform.linux:
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions have not been configured for linux - '
|
||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||
);
|
||||
default:
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions are not supported for this platform.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static const FirebaseOptions web = FirebaseOptions(
|
||||
apiKey: 'AIzaSyDnRirxd46eWwUkK9cKi-g0mKaIBY3LODM',
|
||||
appId: '1:956683546941:web:f66e35806267907c121554',
|
||||
messagingSenderId: '956683546941',
|
||||
projectId: 'blindmaster-54055',
|
||||
authDomain: 'blindmaster-54055.firebaseapp.com',
|
||||
storageBucket: 'blindmaster-54055.firebasestorage.app',
|
||||
measurementId: 'G-Y31FSGG3KP',
|
||||
);
|
||||
|
||||
static const FirebaseOptions android = FirebaseOptions(
|
||||
apiKey: 'AIzaSyBJzL-jeo4xa_rQkHymzku_2lIJ6WJ8hoI',
|
||||
appId: '1:956683546941:android:828055a1f543b75f121554',
|
||||
messagingSenderId: '956683546941',
|
||||
projectId: 'blindmaster-54055',
|
||||
storageBucket: 'blindmaster-54055.firebasestorage.app',
|
||||
);
|
||||
|
||||
static const FirebaseOptions ios = FirebaseOptions(
|
||||
apiKey: 'AIzaSyC0MWniqI8flETaT8zKwXQzBhYRljKIKvk',
|
||||
appId: '1:956683546941:ios:162a6b8aa58f1eb8121554',
|
||||
messagingSenderId: '956683546941',
|
||||
projectId: 'blindmaster-54055',
|
||||
storageBucket: 'blindmaster-54055.firebasestorage.app',
|
||||
iosBundleId: 'com.example.blindMaster',
|
||||
);
|
||||
|
||||
static const FirebaseOptions macos = FirebaseOptions(
|
||||
apiKey: 'AIzaSyC0MWniqI8flETaT8zKwXQzBhYRljKIKvk',
|
||||
appId: '1:956683546941:ios:162a6b8aa58f1eb8121554',
|
||||
messagingSenderId: '956683546941',
|
||||
projectId: 'blindmaster-54055',
|
||||
storageBucket: 'blindmaster-54055.firebasestorage.app',
|
||||
iosBundleId: 'com.example.blindMaster',
|
||||
);
|
||||
|
||||
static const FirebaseOptions windows = FirebaseOptions(
|
||||
apiKey: 'AIzaSyDnRirxd46eWwUkK9cKi-g0mKaIBY3LODM',
|
||||
appId: '1:956683546941:web:f5d94d05b6ce6bef121554',
|
||||
messagingSenderId: '956683546941',
|
||||
projectId: 'blindmaster-54055',
|
||||
authDomain: 'blindmaster-54055.firebaseapp.com',
|
||||
storageBucket: 'blindmaster-54055.firebasestorage.app',
|
||||
measurementId: 'G-WR6581J4P4',
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,21 @@
|
||||
import 'package:blind_master/BlindMasterScreens/Startup/splash_screen.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'firebase_options.dart'; // generated by: flutterfire configure
|
||||
|
||||
// Handles FCM messages that arrive when the app is terminated or in the background.
|
||||
@pragma('vm:entry-point')
|
||||
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
||||
// The system notification tray handles display automatically — nothing to do here.
|
||||
}
|
||||
|
||||
enum DaysOfWeek {Su, M, Tu, W, Th, F, Sa}
|
||||
|
||||
void main() {
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,15 @@
|
||||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import firebase_core
|
||||
import firebase_messaging
|
||||
import flutter_blue_plus_darwin
|
||||
import flutter_secure_storage_macos
|
||||
import path_provider_foundation
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
||||
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
|
||||
FlutterBluePlusPlugin.register(with: registry.registrar(forPlugin: "FlutterBluePlusPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||
510DC9E050C735E1FBF1C1FD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AC7515B2D46078310198AFD4 /* Pods_Runner.framework */; };
|
||||
BE771B8A9976A1289B08647B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = CBE207412544A4AE810D73E6 /* GoogleService-Info.plist */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -84,6 +85,7 @@
|
||||
AC7515B2D46078310198AFD4 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
B470971DD8BAE485C4E2A184 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
BC9EC623BBA5495B6961AC86 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
CBE207412544A4AE810D73E6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
CF16161918037C19DA5DEC89 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
D528F24B7B6048C3ED8D182D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
E3D2DA0696219491C0544B6D /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
@@ -152,6 +154,7 @@
|
||||
33CC10EE2044A3C60003C045 /* Products */,
|
||||
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||
270DDF1080CFA927F62FC922 /* Pods */,
|
||||
CBE207412544A4AE810D73E6 /* GoogleService-Info.plist */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -317,6 +320,7 @@
|
||||
files = (
|
||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
||||
BE771B8A9976A1289B08647B /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
30
macos/Runner/GoogleService-Info.plist
Normal file
30
macos/Runner/GoogleService-Info.plist
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyC0MWniqI8flETaT8zKwXQzBhYRljKIKvk</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>956683546941</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.example.blindMaster</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>blindmaster-54055</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>blindmaster-54055.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:956683546941:ios:162a6b8aa58f1eb8121554</string>
|
||||
</dict>
|
||||
</plist>
|
||||
74
pubspec.lock
74
pubspec.lock
@@ -1,6 +1,14 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_flutterfire_internals:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _flutterfire_internals
|
||||
sha256: ff0a84a2734d9e1089f8aedd5c0af0061b82fb94e95260d943404e0ef2134b11
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.59"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -45,10 +53,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.4.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -121,6 +129,54 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
firebase_core:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_core
|
||||
sha256: "7be63a3f841fc9663342f7f3a011a42aef6a61066943c90b1c434d79d5c995c5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.15.2"
|
||||
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: "0ed0dc292e8f9ac50992e2394e9d336a0275b6ae400d64163fdf0a8a8b556c37"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.24.1"
|
||||
firebase_messaging:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_messaging
|
||||
sha256: "60be38574f8b5658e2f22b7e311ff2064bea835c248424a383783464e8e02fcc"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.2.10"
|
||||
firebase_messaging_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_platform_interface
|
||||
sha256: "685e1771b3d1f9c8502771ccc9f91485b376ffe16d553533f335b9183ea99754"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.6.10"
|
||||
firebase_messaging_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_web
|
||||
sha256: "0d1be17bc89ed3ff5001789c92df678b2e963a51b6fa2bdb467532cc9dbed390"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.10.10"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -324,18 +380,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.17"
|
||||
version: "0.12.18"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.1"
|
||||
version: "0.13.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -505,10 +561,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
|
||||
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.7"
|
||||
version: "0.7.9"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -566,5 +622,5 @@ packages:
|
||||
source: hosted
|
||||
version: "6.6.1"
|
||||
sdks:
|
||||
dart: ">=3.8.0 <4.0.0"
|
||||
dart: ">=3.9.0-0 <4.0.0"
|
||||
flutter: ">=3.29.0"
|
||||
|
||||
@@ -42,6 +42,8 @@ dependencies:
|
||||
flutter_secure_storage: ^9.2.4
|
||||
flutter_xlider: ^3.5.0
|
||||
socket_io_client: ^3.1.2
|
||||
firebase_core: ^3.0.0
|
||||
firebase_messaging: ^15.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
FirebaseCorePluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
firebase_core
|
||||
flutter_secure_storage_windows
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user