This repository has been archived on 2023-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
ha_client/lib/pages/fullscreen.page.dart

37 lines
713 B
Dart
Raw Normal View History

2020-03-12 14:22:38 +02:00
part of '../main.dart';
2020-05-29 19:52:57 +03:00
class FullScreenPage extends StatefulWidget {
2020-03-12 14:22:38 +02:00
final Widget child;
const FullScreenPage({Key key, this.child}) : super(key: key);
2020-05-29 19:52:57 +03:00
@override
_FullScreenPageState createState() => _FullScreenPageState();
}
class _FullScreenPageState extends State<FullScreenPage> {
@override
void initState() {
SystemChrome.setEnabledSystemUIOverlays([]);
super.initState();
}
2020-03-12 14:22:38 +02:00
@override
Widget build(BuildContext context) {
return Container(
color: Colors.black,
child: Center(
2020-05-29 19:52:57 +03:00
child: this.widget.child,
2020-03-12 14:22:38 +02:00
),
);
}
2020-05-29 19:52:57 +03:00
@override
void dispose() {
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
super.dispose();
}
2020-03-12 14:22:38 +02:00
}