side_sheet

Last updated:

0 purchases

side_sheet Image
side_sheet Images
Add to Cart

Description:

side sheet

side_sheet #
A flutter package for implementing of side sheets
A sample. font: https://material.io/components/sheets-side#usage

Simple Usage:
ElevatedButton(
onPressed: () =>
SideSheet.right(
body: Text("Body"),
context: context
),
child: Text('OPEN RIGHT SIDE SHEET')),


ElevatedButton(
onPressed: () =>
SideSheet.left(
body: Text("Body"),
context: context
),
child: Text('OPEN LEFT SIDE SHEET')),
copied to clipboard
Custom Width Side Sheet:
ElevatedButton(
onPressed: () =>
SideSheet.right(
context: context
width: MediaQuery.of(context).size.width * 0.3,
body: Text("Body"),
),
child: Text('OPEN RIGHT SIDE SHEET WITH CUSTOM WIDTH')),


ElevatedButton(
onPressed: () =>
SideSheet.left(
context: context
width: MediaQuery.of(context).size.width * 0.3,
body: Text("Body"),
),
child: Text('OPEN LEFT SIDE SHEET WITH CUSTOM WIDTH')),
copied to clipboard
With return arguments
ElevatedButton(
onPressed: () async {
final data = await SideSheet.left(
body: IconButton(icon: Icon(Icons.close),
onPressed: () => Navigator.pop(context, 'Data Returns Left')),
context: context);

print(data);
},
child: Text('OPEN LEFT SIDE SHEET WITH RETURN DATA')
),

ElevatedButton(
onPressed: () async {
final data = await SideSheet.right(
body: IconButton(
icon: Icon(Icons.close),
onPressed: () => Navigator.pop(context, 'Data Returns Right')),
context: context);

print(data);
},
child: Text('OPEN RIGHT SIDE SHEET WITH RETURN DATA')
),
copied to clipboard
Close sheet in body
Navigator.pop(context);
copied to clipboard
With arguments
Navigator.pop(context, 'data return');
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.