side_sheet 1.0.4 copy "side_sheet: ^1.0.4" to clipboard
side_sheet: ^1.0.4 copied to clipboard

Package for implementation of side sheets for all platforms and responsive UI.

side_sheet #

A flutter package for implementing of side sheets

A sample. font: https://material.io/components/sheets-side#usage

sample

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')),

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')),

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');
70
likes
160
pub points
94%
popularity

Publisher

unverified uploader

Package for implementation of side sheets for all platforms and responsive UI.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on side_sheet