hideNavigation method

Future<bool> hideNavigation(
  1. bool hide
)

Implementation

Future<bool> hideNavigation(bool hide) async {
  if (hide) {
    await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky)
        .whenComplete(() {});
    return true;
  } else {
    await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
        overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]);
    return false;
  }
}