40 lines
1.4 KiB
Dart
40 lines
1.4 KiB
Dart
import 'package:comunika/funcoes_gerais.dart';
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
//import 'package:firebase_messaging/firebase_messaging.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import 'splash/splash.dart';
|
|
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await Firebase.initializeApp();
|
|
// Set the background messaging handler early on, as a named top-level function
|
|
// FirebaseMessaging.onBackgroundMessage((RemoteMessage message) async {
|
|
// await Firebase.initializeApp();
|
|
// print('Handling a background message ${message.messageId}');
|
|
// });
|
|
|
|
runApp(GetMaterialApp(
|
|
title: FuncoesGerais.nomeApp,
|
|
localizationsDelegates: [
|
|
// ... app-specific localization delegate[s] here
|
|
GlobalMaterialLocalizations.delegate,
|
|
GlobalWidgetsLocalizations.delegate,
|
|
GlobalCupertinoLocalizations.delegate
|
|
],
|
|
supportedLocales: [
|
|
const Locale('pt'),
|
|
],
|
|
theme: ThemeData.light().copyWith(primaryColor: Color(0xFF05578e)),
|
|
darkTheme: ThemeData.dark().copyWith(primaryColor: Colors.black87),
|
|
// theme: ThemeData(
|
|
// //brightness: Brightness.dark,
|
|
// visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
// primarySwatch: Colors.blueGrey
|
|
// ),
|
|
themeMode: ThemeMode.dark,
|
|
home: SplashScreen()));
|
|
}
|