In this tutorial, we will see how you can get an Elastic panel that slides horizontally to show fully customized content in Flutter.
Let's Start
Step 1: Create a new Flutter Application.
Step 2: Add a line like this to your package's pubspec.yaml
dependencies:
elastic_drawer: ^2.0.1
Step 3: Now to have this Effect all you have to do is Wrap your Scaffold widget with a widget called ElasticDrawer.
for example:
child: ElasticDrawer(
mainChild: Scaffold(
appBar: AppBar(),
)
)
Now as you see Elastic Drawer has two required parameters which are
mainChild
drawerChild
so, for main child you can add your widget that will be displayed first, and for drawer child can be any widget/screen that will be displayed when we drag it horizontally.