Disable landscape orientation

This commit is contained in:
Moe Poi ~ 2020-09-07 23:02:59 +07:00
parent 9cf3c9a5f8
commit b01b4f3770

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:neonime_app/components/splash.dart'; import 'package:neonime_app/components/splash.dart';
import 'package:flutter/services.dart';
void main() { void main() {
runApp(NeonimeApp()); runApp(NeonimeApp());
@ -15,6 +16,10 @@ class _NeonimeAppState extends State<NeonimeApp> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
return MaterialApp( return MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
home: SplashScreen() home: SplashScreen()