Implement FCM [WIP]

This commit is contained in:
2024-05-31 15:22:27 +02:00
parent 0ad82bb248
commit dfcee5dfc7
33 changed files with 665 additions and 337 deletions

View File

@@ -1,5 +1,8 @@
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
// END: FlutterFire Configuration
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
@@ -29,7 +32,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
namespace "com.example.simplecloudnotifier"
namespace "com.blackforestbytes.simplecloudnotifier"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

View File

@@ -0,0 +1,56 @@
{
"project_info": {
"project_number": "232728961679",
"firebase_url": "https://simplecloudnotifier-ea7ef.firebaseio.com",
"project_id": "simplecloudnotifier-ea7ef",
"storage_bucket": "simplecloudnotifier-ea7ef.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:232728961679:android:23c75317f79601c9",
"android_client_info": {
"package_name": "com.blackforestbytes.simplecloudnotifier"
}
},
"oauth_client": [
{
"client_id": "232728961679-o7gig6f684mp1l1ok7719v3jf3csejc1.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.blackforestbytes.simplecloudnotifier",
"certificate_hash": "3bcafbd39256422f0cb51fd446a228c26543afb4"
}
},
{
"client_id": "232728961679-t1h2eo5keha2lrvhsvdr5kgbkbfkja0o.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBasR6JLAjM5Ut0rPb0euE_9DdDoTkcvKQ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "232728961679-f2951kg24ngsttkhd96qhcr8j3lc8nnk.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "232728961679-bsbtc6orskaqafc8gtsuqia53f6ree48.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.blackforestbytes.SimpleCloudNotifier",
"app_store_id": "6455594868"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -1,6 +1,12 @@
package com.example.simplecloudnotifier
package com.blackforestbytes.simplecloudnotifier
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
onCreate() {
GoogleApiAvailability.makeGooglePlayServicesAvailable()
}
onResume() {
GoogleApiAvailability.makeGooglePlayServicesAvailable()
}
}

View File

@@ -24,6 +24,9 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
// END: FlutterFire Configuration
}
include ":app"

25
flutter/firebase.json Normal file
View File

@@ -0,0 +1,25 @@
{
"flutter":{
"platforms":{
"android":{
"default":{
"projectId":"simplecloudnotifier-ea7ef",
"appId":"1:232728961679:android:23c75317f79601c9",
"fileOutput":"android/app/google-services.json"
}
},
"dart":{
"lib/firebase_options.dart":{
"projectId":"simplecloudnotifier-ea7ef",
"configurations":{
"android":"1:232728961679:android:23c75317f79601c9",
"ios":"1:232728961679:ios:85155ba52c4f3311b446fa",
"macos":"1:232728961679:ios:85155ba52c4f3311b446fa",
"web":"1:232728961679:web:e53211fff778ab61b446fa",
"windows":"1:232728961679:web:6e8235651da6241eb446fa"
}
}
}
}
}
}

13
flutter/firepit-log.txt Normal file

File diff suppressed because one or more lines are too long

View File

@@ -367,7 +367,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier;
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.example.simplecloudnotifier.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -402,7 +402,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -418,7 +418,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -545,7 +545,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -567,7 +567,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;

View File

@@ -138,6 +138,37 @@ class APIClient {
);
}
static Future<Client> addClient(KeyTokenAuth? auth, String fcmToken, String agentModel, String agentVersion, String clientType) async {
return await _request(
name: 'addClient',
method: 'POST',
relURL: 'users/${auth!.userId}/clients',
jsonBody: {
'fcm_token': fcmToken,
'agent_model': agentModel,
'agent_version': agentVersion,
'client_type': clientType,
},
fn: Client.fromJson,
auth: auth,
);
}
static Future<Client> updateClient(KeyTokenAuth? auth, String clientID, String fcmToken, String agentModel, String agentVersion) async {
return await _request(
name: 'updateClient',
method: 'PUT',
relURL: 'users/${auth!.userId}/clients/$clientID',
jsonBody: {
'fcm_token': fcmToken,
'agent_model': agentModel,
'agent_version': agentVersion,
},
fn: Client.fromJson,
auth: auth,
);
}
static Future<List<ChannelWithSubscription>> getChannelList(KeyTokenAuth auth, ChannelSelector sel) async {
return await _request(
name: 'getChannelList',

View File

@@ -0,0 +1,94 @@
// 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: 'AIzaSyCbA3VPKlkfJXw27L_J1x5VbfxeqmjdR5o',
appId: '1:232728961679:web:e53211fff778ab61b446fa',
messagingSenderId: '232728961679',
projectId: 'simplecloudnotifier-ea7ef',
authDomain: 'simplecloudnotifier-ea7ef.firebaseapp.com',
databaseURL: 'https://simplecloudnotifier-ea7ef.firebaseio.com',
storageBucket: 'simplecloudnotifier-ea7ef.appspot.com',
);
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyBasR6JLAjM5Ut0rPb0euE_9DdDoTkcvKQ',
appId: '1:232728961679:android:23c75317f79601c9',
messagingSenderId: '232728961679',
projectId: 'simplecloudnotifier-ea7ef',
databaseURL: 'https://simplecloudnotifier-ea7ef.firebaseio.com',
storageBucket: 'simplecloudnotifier-ea7ef.appspot.com',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyCJpUsV4ApJfQPcSDpPj2CkzNyS8093A8s',
appId: '1:232728961679:ios:85155ba52c4f3311b446fa',
messagingSenderId: '232728961679',
projectId: 'simplecloudnotifier-ea7ef',
databaseURL: 'https://simplecloudnotifier-ea7ef.firebaseio.com',
storageBucket: 'simplecloudnotifier-ea7ef.appspot.com',
androidClientId: '232728961679-o7gig6f684mp1l1ok7719v3jf3csejc1.apps.googleusercontent.com',
iosBundleId: 'com.blackforestbytes.simplecloudnotifier',
);
static const FirebaseOptions macos = FirebaseOptions(
apiKey: 'AIzaSyCJpUsV4ApJfQPcSDpPj2CkzNyS8093A8s',
appId: '1:232728961679:ios:85155ba52c4f3311b446fa',
messagingSenderId: '232728961679',
projectId: 'simplecloudnotifier-ea7ef',
databaseURL: 'https://simplecloudnotifier-ea7ef.firebaseio.com',
storageBucket: 'simplecloudnotifier-ea7ef.appspot.com',
androidClientId: '232728961679-o7gig6f684mp1l1ok7719v3jf3csejc1.apps.googleusercontent.com',
iosBundleId: 'com.blackforestbytes.simplecloudnotifier',
);
static const FirebaseOptions windows = FirebaseOptions(
apiKey: 'AIzaSyCbA3VPKlkfJXw27L_J1x5VbfxeqmjdR5o',
appId: '1:232728961679:web:6e8235651da6241eb446fa',
messagingSenderId: '232728961679',
projectId: 'simplecloudnotifier-ea7ef',
authDomain: 'simplecloudnotifier-ea7ef.firebaseapp.com',
databaseURL: 'https://simplecloudnotifier-ea7ef.firebaseio.com',
storageBucket: 'simplecloudnotifier-ea7ef.appspot.com',
);
}

View File

@@ -1,13 +1,17 @@
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:fl_toast/fl_toast.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:simplecloudnotifier/api/api_client.dart';
import 'package:simplecloudnotifier/nav_layout.dart';
import 'package:simplecloudnotifier/state/app_theme.dart';
import 'package:simplecloudnotifier/state/application_log.dart';
import 'package:simplecloudnotifier/state/globals.dart';
import 'package:simplecloudnotifier/state/request_log.dart';
import 'package:simplecloudnotifier/state/user_account.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
@@ -35,6 +39,22 @@ void main() async {
ApplicationLog.error('Failed to open Hive-Box: scn-logs: ' + exc.toString(), trace: trace);
}
UserAccount(); // ensure UserAccount is loaded
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
final notificationSettings = await FirebaseMessaging.instance.requestPermission(provisional: true);
FirebaseMessaging.instance.onTokenRefresh.listen((fcmToken) {
try {
setFirebaseToken(fcmToken);
} catch (exc, trace) {
ApplicationLog.error('Failed to set firebase token: ' + exc.toString(), trace: trace);
}
}).onError((dynamic err) {
ApplicationLog.error('Failed to listen to token refresh events: ' + (err?.toString() ?? ''));
});
ApplicationLog.debug('Application started');
runApp(
@@ -48,13 +68,25 @@ void main() async {
);
}
void setFirebaseToken(String fcmToken) async {
ApplicationLog.info('New firebase token: $fcmToken');
final acc = UserAccount();
if (acc.auth != null) {
if (acc.client == null) {
final client = await APIClient.addClient(acc.auth, fcmToken, Globals().platform, Globals().version, Globals().clientType);
acc.setClient(client);
} else {
final client = await APIClient.updateClient(acc.auth, acc.client!.clientID, fcmToken, Globals().platform, Globals().version);
acc.setClient(client);
}
}
}
class SCNApp extends StatelessWidget {
const SCNApp({super.key});
@override
Widget build(BuildContext context) {
Provider.of<UserAccount>(context); // ensure UserAccount is loaded (unneccessary if lazy: false is set in MultiProvider ??)
return Consumer<AppTheme>(
builder: (context, appTheme, child) => MaterialApp(
title: 'SimpleCloudNotifier',

View File

@@ -1,5 +1,6 @@
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -18,6 +19,8 @@ class Globals {
String buildNumber = '';
String platform = '';
String hostname = '';
String clientType = '';
String deviceModel = '';
late SharedPreferences sharedPrefs;
@@ -31,6 +34,25 @@ class Globals {
this.platform = Platform.operatingSystem;
this.hostname = Platform.localHostname;
if (Platform.isAndroid) {
this.clientType = 'ANDROID';
this.deviceModel = (await DeviceInfoPlugin().androidInfo).model;
} else if (Platform.isIOS) {
this.clientType = 'IOS';
this.deviceModel = (await DeviceInfoPlugin().iosInfo).model;
} else if (Platform.isLinux) {
this.clientType = 'LINUX';
this.deviceModel = (await DeviceInfoPlugin().linuxInfo).prettyName;
} else if (Platform.isWindows) {
this.clientType = 'WINDOWS';
this.deviceModel = (await DeviceInfoPlugin().windowsInfo).productName;
} else if (Platform.isMacOS) {
this.clientType = 'MACOS';
this.deviceModel = (await DeviceInfoPlugin().macOsInfo).model;
} else {
this.clientType = '?';
}
this.sharedPrefs = await SharedPreferences.getInstance();
}
}

View File

@@ -1,6 +1,7 @@
import 'package:flutter/foundation.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simplecloudnotifier/api/api_client.dart';
import 'package:simplecloudnotifier/models/client.dart';
import 'package:simplecloudnotifier/models/key_token_auth.dart';
import 'package:simplecloudnotifier/models/user.dart';
import 'package:simplecloudnotifier/state/globals.dart';
@@ -9,10 +10,19 @@ class UserAccount extends ChangeNotifier {
User? _user;
User? get user => _user;
Client? _client;
Client? get client => _client;
KeyTokenAuth? _auth;
KeyTokenAuth? get auth => _auth;
UserAccount() {
static UserAccount? _singleton = UserAccount._internal();
factory UserAccount() {
return _singleton ?? (_singleton = UserAccount._internal());
}
UserAccount._internal() {
load();
}
@@ -38,6 +48,16 @@ class UserAccount extends ChangeNotifier {
notifyListeners();
}
void setClient(Client client) {
_client = client;
notifyListeners();
}
void clearClient() {
_client = null;
notifyListeners();
}
void load() {
final uid = Globals().sharedPrefs.getString('auth.userid');
final tok = Globals().sharedPrefs.getString('auth.token');

View File

@@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
set(BINARY_NAME "simplecloudnotifier")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.simplecloudnotifier")
set(APPLICATION_ID "com.blackforestbytes.simplecloudnotifier")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.

View File

@@ -5,12 +5,18 @@
import FlutterMacOS
import Foundation
import device_info_plus
import firebase_core
import firebase_messaging
import package_info_plus
import path_provider_foundation
import shared_preferences_foundation
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))

View File

@@ -384,7 +384,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/simplecloudnotifier.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/simplecloudnotifier";
@@ -398,7 +398,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/simplecloudnotifier.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/simplecloudnotifier";
@@ -412,7 +412,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/simplecloudnotifier.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/simplecloudnotifier";

View File

@@ -8,7 +8,7 @@
PRODUCT_NAME = simplecloudnotifier
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.simplecloudnotifier
PRODUCT_BUNDLE_IDENTIFIER = com.blackforestbytes.simplecloudnotifier
// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
PRODUCT_COPYRIGHT = Copyright © 2024 blackforestbytes. All rights reserved.

View File

@@ -9,6 +9,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "67.0.0"
_flutterfire_internals:
dependency: transitive
description:
name: _flutterfire_internals
sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7"
url: "https://pub.dev"
source: hosted
version: "1.3.35"
analyzer:
dependency: transitive
description:
@@ -177,6 +185,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.6"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
sha256: eead12d1a1ed83d8283ab4c2f3fca23ac4082f29f25f29dff0f758f57d06ec91
url: "https://pub.dev"
source: hosted
version: "10.1.0"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64
url: "https://pub.dev"
source: hosted
version: "7.0.0"
fake_async:
dependency: transitive
description:
@@ -201,6 +225,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "7.0.0"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c"
url: "https://pub.dev"
source: hosted
version: "2.32.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63
url: "https://pub.dev"
source: hosted
version: "5.0.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9"
url: "https://pub.dev"
source: hosted
version: "2.17.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
sha256: a1662cc95d9750a324ad9df349b873360af6f11414902021f130c68ec02267c4
url: "https://pub.dev"
source: hosted
version: "14.9.4"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: "87c4a922cb6f811cfb7a889bdbb3622702443c52a0271636cbc90d813ceac147"
url: "https://pub.dev"
source: hosted
version: "4.5.37"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "0d34dca01a7b103ed7f20138bffbb28eb0e61a677bf9e78a028a932e2c7322d5"
url: "https://pub.dev"
source: hosted
version: "3.8.7"
fixnum:
dependency: transitive
description:
@@ -884,6 +956,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.5.0"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb"
url: "https://pub.dev"
source: hosted
version: "1.1.3"
xdg_directories:
dependency: transitive
description:

View File

@@ -26,6 +26,9 @@ dependencies:
fl_toast: ^3.2.0
xid: ^1.2.1
flutter_lazy_indexed_stack: ^0.0.6
firebase_core: ^2.32.0
firebase_messaging: ^14.9.4
device_info_plus: ^10.1.0
dependency_overrides:

View File

@@ -6,9 +6,12 @@
#include "generated_plugin_registrant.h"
#include <firebase_core/firebase_core_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

View File

@@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
firebase_core
url_launcher_windows
)

View File

@@ -89,11 +89,11 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "com.example" "\0"
VALUE "CompanyName", "blackforestbytes" "\0"
VALUE "FileDescription", "simplecloudnotifier" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "simplecloudnotifier" "\0"
VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0"
VALUE "LegalCopyright", "Copyright (C) 2024 blackforestbytes. All rights reserved." "\0"
VALUE "OriginalFilename", "simplecloudnotifier.exe" "\0"
VALUE "ProductName", "simplecloudnotifier" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"