side_sheet 1.0.0 side_sheet: ^1.0.0 copied to clipboard
Package for implementing of side sheets
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')),
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')
),
Close sheet in body
Navigator.pop(context);
With arguments
Navigator.pop(context, 'data return');