snapping_sheet 0.0.2 copy "snapping_sheet: ^0.0.2" to clipboard
snapping_sheet: ^0.0.2 copied to clipboard

outdated

A package that provides a bottom sheet widget that snaps to different vertical positions

Snapping sheet #

A package that provides a bottom sheet widget that snaps to different vertical positions

How the layout looks like A app example with SnappingSheet

Using #

Begin by following the install instruction.

You can add the snapping sheet to you app by adding the following code

    import 'package:flutter/material.dart';
    import 'package:snapping_sheet/snapping_sheet.dart';

    class SnapSheetExample extends StatelessWidget {
        @override
        Widget build(BuildContext context) {
            return Scaffold(
            body: SnappingSheet(
                    sheet: Container(
                        color: Colors.red
                    ),
                    grabing: Container(
                        color: Colors.blue,
                    ),
                ),
            );
        }
    }

Snap positions #

To change the snap positions for the sheet, change the snapPositions parameter witch takes in a list of SnapPosition.

    SnappingSheet(
        snapPositions: [
            SnapPosition(
                positionPixel: 25.0, 
                snappingCurve: Curves.elasticOut, 
                snappingDuration: Duration(milliseconds: 750)
            ),
            SnapPosition(
                positionFactor: 0.5, 
                snappingCurve: Curves.ease, 
                snappingDuration: Duration(milliseconds: 500)
            ),
        ],
    )
730
likes
0
pub points
95%
popularity

Publisher

verified publisheradamjonsson.dev

A package that provides a bottom sheet widget that snaps to different vertical positions

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on snapping_sheet