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.
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!;
},
),
);
}),
);
}
}