Added safe area when in mobile

- Added safe area for notches, ect, when in mobile
- Reduced padding since I only increased it because of the notches
- Cleaned up README
This commit is contained in:
Tony Bark 2021-05-29 13:14:04 -04:00
parent 637e0da13d
commit 1b66d28f95
3 changed files with 6 additions and 18 deletions

View file

@ -1,16 +1,3 @@
# Bull's Eye # BullsEye
A new Flutter project. A game written in Flutter, based on a tutorial with my own tweaks added.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

View file

@ -11,7 +11,7 @@ class Control extends StatefulWidget {
} }
class _ControlState extends State<Control> { class _ControlState extends State<Control> {
static const double PADDING = 45; static const double PADDING = 25;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -80,10 +80,11 @@ class _GamePageState extends State<GamePage> {
} }
Widget mobileContainer() { Widget mobileContainer() {
return Column(mainAxisAlignment: MainAxisAlignment.center, children: [ return SafeArea(
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
gameContainer(), gameContainer(),
Score(totalScore: _model.totalScore, round: _model.round) Score(totalScore: _model.totalScore, round: _model.round)
]); ]));
} }
Widget desktopContainer() { Widget desktopContainer() {