I want to make a little panel sliding from the right onPress to display some information. I already have a Drawer in my Scaffold to display a menu.
I am looking for something like this :

I haven't found anything yet except for Drawer
You can use the drawer and endDrawer property of the Scaffold widget. The drawer slides in from the start (left) and the endDrawer slides in from the end (right). This way you can have two different drawers, one on the left side, one on the right side.
Here a quick minimal example:

import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(),
drawer: Drawer(
child: Center(child: Text('Left!')),
),
endDrawer: Drawer(
child: Center(child: Text('Right!')),
),
),);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With