Skip to content

Instantly share code, notes, and snippets.

@tirth-aubergine
Created December 12, 2019 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tirth-aubergine/c81b6b6f6c5ebf3523c2fbd41eb08d52 to your computer and use it in GitHub Desktop.
Save tirth-aubergine/c81b6b6f6c5ebf3523c2fbd41eb08d52 to your computer and use it in GitHub Desktop.
Platypus
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