Hiding the nav bar? Is it possible? (not from the settings of Flutterflow)

Widgets & Design

Hello, is it possible to hide the nav bar using an action?

I tried the following code but it is not working:

// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:flutter/services.dart';

Future hideNavBar() async {
  // Add your function code here!
  debugPrint('I will now hide the nav bar');
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
}
What have you tried so far?

Tried implementing it

Did you check FlutterFlow's Documentation for this topic?
Yes
2 replies