I use setEnabledSystemUIOverlays to hide status bar and virtual button bar.
But there are blanks on the top and bottom of the screen (as seen in the photo):
Does anyone know how to solve it?
Here is my code:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
SystemChrome.setEnabledSystemUIOverlays([]);
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "Test",
home: new MyHomePage(title: "Test"),
);
}
}
class MyHomePage extends StatelessWidget {
final String title;
MyHomePage({Key key, this.title}) : super(key: key);
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(title),
),
body: new Container(
color: Colors.red,
),
);
}
}
To enable fullscreen mode with Sticky emersive, pass the fullscreen mode (FullScreenMode. EMERSIVE_STICKY)as an argument the the enterFullScreen method of the FullScreen class.
To Hide StatusBar user can try the below things: SystemChrome. setEnabledSystemUIOverlays([]) should do what you want.
A splash screen is a launch screen, start screen, or boot screen, which is a graphical control element containing the image, logo, and current version of the software. It is the first screen of the app that displays whenever the application is loading.
set resizeToAvoidBottomPadding: false to Scaffold.
return Scaffold(
resizeToAvoidBottomPadding: false,
);
this it work perfect for me:
@override
Widget build(BuildContext context) {
// To make this screen full screen.
// It will hide status bar and notch.
SystemChrome.setEnabledSystemUIOverlays([]);
// full screen image for splash screen.
return Container(
child: new Image.asset('assets/splash.png', fit: BoxFit.fill));
}
}
import this
import 'package:flutter/services.dart';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With