expandable_overlay 0.0.3
expandable_overlay: ^0.0.3 copied to clipboard
An overlay that expands from the button that's used to open it and then collapses back into it
This package fascilitates easy creation of expandable overlays that expand out of any widget wrapped by ExpandableOverlayLauncher
.
Getting Started #
Install package via command line (or just add it in pubspec.yaml
):
flutter pub add expandable_overlay
Usage #
1. Import the package: #
import 'package:expandable_overlay/expandable_overlay.dart';
2. Wrap an element with the ExpandableOverlayLauncher
widget. #
ExpandableOverlayLauncher(
overlayParams: ExpandableOverlayParams(
contentBuilder: (
context,
dismissOverlay, // function that can be used to dismiss the modal through code
) => Text("I'm inside the modal"), // widget containing the contents of the modal
),
// widget that will be tapped to open the modal
// will appear at the top of the modal when it expands
child: Text('click me'),
)