diff --git a/lib/pages/episode-detail.dart b/lib/pages/episode-detail.dart index a3accb1..183d3ff 100644 --- a/lib/pages/episode-detail.dart +++ b/lib/pages/episode-detail.dart @@ -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 { final GlobalKey asyncLoaderState = new GlobalKey(); 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;