I am working on my flutter application and I want to display it in fullscreen.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
runApp(const MyApp());
}
I`m using SystemChrome in the main.dart file but when I debug my code the file "system_chrome.dart" gets opened with this error:
} else {
assert(mode == SystemUiMode.manual && overlays != null);
await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.setEnabledSystemUIOverlays',
_stringify(overlays!),
);
}
If I use SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []); in each build method of my pages individually the code gets debugged without a problem.
Thank you in advance!