0

I have tried different things from different sites and articles but i cannot get rid the black bar on top

1 Answers1

1

it's been asked here

tl;dr add this piece code to the main function, before runApp()

SystemChrome.setEnabledSystemUIOverlays([])

code:

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[]);

  runApp(MyApp());
}

the screen you want to make will be like this

class SplashScreen extends StatefulWidget {
  @override
  _SplashScreenState createState() => _SplashScreenState();
}

class _SplashScreenState extends State<SplashScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold();
  }
}

result: image result

without SystemChrome.setEnabledSystemUIOverlays([]): enter image description here

AngDrew
  • 136
  • 6