-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from bennyboer/57-fullscreen-mode
57 fullscreen mode
- Loading branch information
Showing
3 changed files
with
291 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// View displaying a passed widget full screen. | ||
class FullscreenView extends StatefulWidget { | ||
/// Child to display fullscreen. | ||
final Widget _child; | ||
|
||
FullscreenView({ | ||
@required Widget child, | ||
}) : _child = child; | ||
|
||
@override | ||
State<StatefulWidget> createState() => _FullscreenViewState(); | ||
} | ||
|
||
/// State of the fullscreen view. | ||
class _FullscreenViewState extends State<FullscreenView> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: SafeArea( | ||
child: Center(child: widget._child), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.