You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:sizer/sizer.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:watermanagement/splash_screen.dart';
|
|
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
|
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
|
|
|
|
|
|
|
|
|
|
|
void main () async {
|
|
|
|
// Set default home.
|
|
|
|
Widget _defaultHome = Splash();
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await Firebase.initializeApp();
|
|
|
|
FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(alert: true,badge: true,sound: true);
|
|
|
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
|
|
|
|
.then((_) {
|
|
|
|
runApp(Sizer(
|
|
|
|
builder: (context, orientation, deviceType) {
|
|
|
|
return MaterialApp(
|
|
|
|
title: 'Water Management',
|
|
|
|
theme: ThemeData.light(),
|
|
|
|
home:_defaultHome,
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
);
|
|
|
|
},
|
|
|
|
));
|
|
|
|
});
|
|
|
|
}
|