preTesting
This commit is contained in:
@@ -1,29 +1,20 @@
|
||||
import 'package:blind_master/BlindMasterResources/fcm_service.dart';
|
||||
import 'package:blind_master/BlindMasterResources/apns_service.dart';
|
||||
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() async {
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
||||
FirebaseMessaging.instance.onTokenRefresh.listen((_) => FcmService.register());
|
||||
// Wire the APNs MethodChannel handler before any UI runs so a token
|
||||
// delivered by iOS during launch is still picked up.
|
||||
ApnsService.install();
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
Map<String, Color> getBackgroundBasedOnTime() {
|
||||
final hour = DateTime.now().hour;
|
||||
|
||||
|
||||
Color secondaryLight;
|
||||
Color primary;
|
||||
Color secondaryDark;
|
||||
@@ -43,7 +34,7 @@ Map<String, Color> getBackgroundBasedOnTime() {
|
||||
secondaryLight = const Color.fromARGB(255, 186, 130, 255);
|
||||
secondaryDark = const Color.fromARGB(255, 40, 0, 89);
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
'primary': primary,
|
||||
'secondaryLight': secondaryLight,
|
||||
@@ -78,4 +69,3 @@ class MyApp extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user