How to remove back button from show bottom sheet?

513 views
Skip to first unread message

Falak Sabbir

unread,
Dec 25, 2018, 3:17:50 AM12/25/18
to Flutter Dev
I am using show bottom sheet. But when I open show bottom sheet, in appbar back button is always showing. Automatically a back button appears. How to remove this back button from appbar? I am using like this:
new RaisedButton(
  child: new Text(
      'Click',
  ),
  color: Color.fromRGBO(2,49,75,1.0),
  elevation: 0.0,
  onPressed: _showBottomSheet,
)

_showBottomSheet(){
setState(() {
_showBottomSheetCallBack = null;
});
_scaffoldKey.currentState.showBottomSheet<Null>((BuildContext context) {
return new Container(
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Padding(
padding: const EdgeInsets.all(16.0),
child: new Text(
'Persistent header for bottom bar!',
textAlign: TextAlign.left,
)),
],
));
}).closed.whenComplete((){
if(mounted){
setState(() {
_showBottomSheetCallBack = _showBottomSheet;
});
}
});
}













Reply all
Reply to author
Forward
0 new messages