0

I want to hide the navigation bar in my app, but now my status bar also disappears and leaves a black space as shown, how do i fix this and make the app fillable full screen. enter image description here

Below is my code at main.dart

import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_application_1/libary/one_libary.dart';
import 'package:flutter_downloader/flutter_downloader.dart';
import 'package:get/get.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  InitialBinding().dependencies();
  await Firebase.initializeApp();
  await FlutterDownloader.initialize();
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky, overlays: [SystemUiOverlay.top]);
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.portraitUp,
      DeviceOrientation.portraitDown,
    ]);

    return MaterialApp(
      home: Builder(builder: (context) {
        return Scaffold(
          resizeToAvoidBottomInset: false,
          body: GetMaterialApp(
            debugShowCheckedModeBanner: false,
            initialRoute: AppRoutes.SPLASH_SCREEN.name,
            onGenerateRoute: AppRouteExt.bindingRoute,
            builder: (context, child) {
              return child!;
            },
          ),
        );
      }),
    );
  }
}
Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56
natt
  • 11
  • 5
  • change status-bar color. – JB Jason Mar 11 '23 at 12:58
  • for example, if i change the status bar color, it will change from black to blue, statusbar will be inserted over the whole application, i want that status bar to overlap my content. Do you have any way? – natt Mar 11 '23 at 13:21

0 Answers0