fluttercommunity / fluttercommunity/flutter_webview_plugin

Drawer Hack

Open
#113 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.5k
Forks
936
PR merge metrics
No merged PRs in 30d

Description

can we assign the hidden attribute to the state and create a function to toggle between hidden = true and hidden = false , to hide the webview rect when the drawer is opened
and we use the leading in Appbar to control that

State and function to toggle visibility
`
bool _visibility = false;
_handleDrawer(){
_scaffoldKey.currentState.openDrawer();
setState(() {
_visibility = true;
});
}
`

` appBar: new AppBar(
centerTitle: true,
leading: new IconButton(icon: new Icon(
Icons.menu
),onPressed:_handleDrawer,),
title: new Text('Plugin example app'),
),
`
so when the drawer is opened the state of the webview hidden is true , and when drawer is closed hidden is false

I am a beginner and i cant make the toggle function to work

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the AppBar leading button and the _handleDrawer example in the issue, then trace how the drawer and webview rect are represented in the example app. Done means opening the drawer sets the webview's hidden state to true and closing it restores false, with the toggle behavior verified in the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.