migração flutter 2.2.1
This commit is contained in:
+18
-5
@@ -1,11 +1,21 @@
|
||||
import 'package:decpisos/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';
|
||||
|
||||
void main() {
|
||||
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: [
|
||||
@@ -17,11 +27,14 @@ void main() {
|
||||
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,
|
||||
theme: ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
),
|
||||
home: SplashScreen()
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user