Flutter - Drawer menu behind WebViewScaffold

1

i have class stateLessWidget, where i would like:

1) Load a web page with a URL (it works well) 2) Use a Drawer Menu (it works well)

THE ISSUE: My drawer menu is behind the view :( .

Maybe because the WebviewScaffold load later drawer menu ?

Thank you guys!

my Homepage Stateless widget

Widget build(BuildContext context) {

    return Scaffold(

        appBar: AppBar(
          title: Text(
              'Benvenuto',
              style: TextStyle(color: Colors.white)
          ),
          backgroundColor: Color(0xFF4035b1),
        ),

        drawer: Drawer(
          child: new Column(
            children: <Widget>[
              new UserAccountsDrawerHeader(
                  accountName: Text('TEST.IT', style: TextStyle(color:Color(0xFFFFFFFF))),
                  decoration: BoxDecoration(
                      gradient: LinearGradient(
                          colors: [
                            Color(0xFF584CD1),
                            Color(0xFF0fd1c0)
                          ],
                          begin: FractionalOffset(0.4, 0.2),
                          end: FractionalOffset(1.0, 0.6),
                          stops: [0.0, 0.9],
                          tileMode: TileMode.clamp
                      )
                  ),
                  accountEmail: Text("TEST TEXT", style: TextStyle(color:Color(0xFFFFFFFF))),
                  currentAccountPicture: new CircleAvatar(
                    radius: 50.0,
                    backgroundColor: const Color(0xFF778899),
                    backgroundImage: NetworkImage("https://domain.it/images/user.jpg"),
                  )
              ),
              new Column(children: drawerOptions)
            ],
          ),
        ),

        body: WebviewScaffold(
          url: "https://domain.it/api/api_booking",
          withJavascript: true,
          headers: {'Authorization': 'Bearer ' + tokenAccess},
          /*appBar: new AppBar(
                title: Text("Test page"),
              ),*/
          withZoom: true,
          withLocalStorage: true,
          hidden: true,
        )
    );
    // return
  }

enter image description here

dart
flutter
asked on Stack Overflow May 21, 2019 by Diego Cespedes

1 Answer

0

Replace the Scaffold to WebviewScaffold and remove the WebviewScaffold from the body, what you're doing is nesting the scaffolds.

answered on Stack Overflow May 22, 2019 by Sean Urgel

User contributions licensed under CC BY-SA 3.0