Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide AppBar in the application created in Flutter [duplicate]

Tags:

flutter

I have this code below, I want to hide the bar app, is it possible? I've tried straight through the Android Theme but I did not get Success. :(

  @override
  Widget build(BuildContext context) {
    return WebviewScaffold(
      appBar: AppBar(
        title: TextField(
          autofocus: false,
          controller: controller,
          textInputAction: TextInputAction.go,
          onSubmitted: (url) => launchUrl(),
          style: TextStyle(color: Colors.white),
          decoration: InputDecoration(
            border: InputBorder.none,
            hintText: "Digite a URL",
            hintStyle: TextStyle(color: Colors.white),
          ),
        ),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.navigate_next),
            onPressed: () => launchUrl(),
          )
        ],
      ),
like image 608
J Roberto Avatar asked Jan 27 '26 15:01

J Roberto


1 Answers

To hide the appBar simply set the appBar property as null in any screen. This change will be reflected in IOS as well as Android. :)

  Widget build(BuildContext context) {
    return WebviewScaffold(
       url: "https://flutter.dev/",                    // Your url
       appBar: null                                    // No action bar will build
       );
    }
like image 91
Aditi Soni Avatar answered Jan 31 '26 06:01

Aditi Soni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!