From 096e714a04f9653e3dfff2ec61c9507dfc6053bb Mon Sep 17 00:00:00 2001 From: Yegor Vialov Date: Fri, 29 May 2020 16:52:57 +0000 Subject: [PATCH] Real fullscreen for camera view --- lib/pages/fullscreen.page.dart | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/pages/fullscreen.page.dart b/lib/pages/fullscreen.page.dart index e3de918..37b17ea 100644 --- a/lib/pages/fullscreen.page.dart +++ b/lib/pages/fullscreen.page.dart @@ -1,18 +1,37 @@ part of '../main.dart'; -class FullScreenPage extends StatelessWidget { +class FullScreenPage extends StatefulWidget { final Widget child; const FullScreenPage({Key key, this.child}) : super(key: key); + @override + _FullScreenPageState createState() => _FullScreenPageState(); +} + +class _FullScreenPageState extends State { + + @override + void initState() { + SystemChrome.setEnabledSystemUIOverlays([]); + super.initState(); + } + @override Widget build(BuildContext context) { return Container( color: Colors.black, child: Center( - child: this.child, + child: this.widget.child, ), ); } + + @override + void dispose() { + SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); + super.dispose(); + } + } \ No newline at end of file