Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.