Created
December 12, 2019 07:05
-
-
Save tirth-aubergine/c81b6b6f6c5ebf3523c2fbd41eb08d52 to your computer and use it in GitHub Desktop.
Platypus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:provider/provider.dart'; | |
import 'package:platypus/screens/home/home.dart'; | |
import 'package:platypus/providers/home.dart'; | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
// setting landscape orientation mode for the app | |
await SystemChrome.setPreferredOrientations([ | |
DeviceOrientation.landscapeRight, | |
DeviceOrientation.landscapeLeft, | |
]); | |
runApp( | |
MultiProvider( | |
providers: [ | |
ChangeNotifierProvider<HomeProvider>( | |
create: (context) => HomeProvider(), | |
), | |
], | |
child: MyApp(), | |
), | |
); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Platypus', | |
theme: ThemeData( | |
brightness: Brightness.dark, | |
), | |
routes: { | |
'/': (context) => HomeScreen(), | |
}, | |
initialRoute: '/', | |
debugShowCheckedModeBanner: false, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment