An easy way to show a flutter custom popup widget.
Android | iOS |
---|---|
cd ./example
flutter create .
flutter run
dependencies:
easy_popup: ^1.0.0
or
dependencies:
easy_popup:
git: https://github.com/BakerJQ/flutter_easy_popup.git
Define your custom popup widget with EasyPopupChild, and implement dismiss function which does work that need to be done while dismiss, eg. show dismiss animation.
class CustomWidget extends StatefulWidget with EasyPopupChild {
...
@override
dismiss() {
...
}
}
Call EasyPopup.show() to show your widget as a popup.
EasyPopup.show(context, CustomWidget());