Column( children: [ Container(height: 30, color: Colors.yellow, child: ElevatedButton(onPressed: (){ setState(() { showBrowser = !showBrowser; }); }, child: Container(color: Colors.blue)),), Expanded(child: showBrowser ? Container(color: Colors.red,):ExampleBrowser()), ], ) I use this code to add a button to control the display and hiding of webview. https://github.com/user-attachments/assets/05649cb5-a762-4c9a-877e-3569aa149a46
Column(
children: [
Container(height: 30, color: Colors.yellow, child: ElevatedButton(onPressed: (){
setState(() {
showBrowser = !showBrowser;
});
}, child: Container(color: Colors.blue)),),
Expanded(child: showBrowser ? Container(color: Colors.red,):ExampleBrowser()),
],
)
7C1D4652BD4EFFCC1A412414AF04A7A5.mp4