I wish to open a side menu from left when clicked on an icon.
Code:
class _MovieScreenState extends State<MovieScreen> {
MovieBloc _bloc;
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_bloc = MovieBloc();
}
@override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey,
drawer: new Drawer(),
appBar: AppBar(
backgroundColor: Color(0xffFAFCF7), // status bar color
brightness: Brightness.light,
elevation: 0.0,
leading: Container(
margin: EdgeInsets.only(left: 17),
child: RawMaterialButton(
onPressed: _scaffoldKey.currentState.openDrawer(),
child: new Icon(
Icons.menu,
// color: Colors.black,
size: 25.0,
),
shape: new CircleBorder(),
elevation: 4.0,
fillColor: Colors.white,
padding: const EdgeInsets.all(5.0),
),
...
So, onTap i wish to open the screen from the left with full screen cover. Also, will it be possible to open the side screen if swipe towards to right from left is done on home screen. Thanks