mirror of
https://gitlab.com/moepoi/neonime-app.git
synced 2024-12-18 12:18:50 +01:00
Enable landscape orientation only in episode detail page
This commit is contained in:
parent
b01b4f3770
commit
430345f9b7
1 changed files with 27 additions and 2 deletions
|
@ -4,15 +4,40 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:async_loader/async_loader.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:neonime_app/scrapper/new-release.dart';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'anime-detail.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class EpisodeDetail extends StatelessWidget {
|
||||
class EpisodeDetail extends StatefulWidget {
|
||||
@override
|
||||
_EpisodeDetailState createState() => _EpisodeDetailState();
|
||||
}
|
||||
|
||||
class _EpisodeDetailState extends State<EpisodeDetail> {
|
||||
final GlobalKey<AsyncLoaderState> asyncLoaderState =
|
||||
new GlobalKey<AsyncLoaderState>();
|
||||
InAppWebViewController webView;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.landscapeRight,
|
||||
DeviceOrientation.landscapeLeft,
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final argsData = ModalRoute.of(context).settings.arguments as Map;
|
||||
|
|
Loading…
Reference in a new issue