flutter_dialogs 0.0.1+1
flutter_dialogs: ^0.0.1+1 copied to clipboard
Platform aware dialog and alert widgets.
flutter_dialogs #
Platform aware dialog and alert widgets.
NOTE: This is still in technical preview
Features #
- Platform aware dialog and alert widgets
- Ready to use dialogs with common UX/UI patterns
- Extendable components for custom platform-aware dialog and alert widgets
Configuration #
| Name | Description | Options |
|---|---|---|
FDPlatform |
Forces the dialog to adapt to a specified platform design language, and disregard current host OS. | ANDROID_ONLY,IOS_ONLY,ALL |
Basic Components #
| Name | Parameters |
|---|---|
FDBasicDialog |
String title,String content,String buttonTitle,Function onPressed |
| More coming out soon! |
Extendable Components #
| Name | Parameters |
|---|---|
| More coming out soon! |
Basic Usage #
- Declare an
FDConfig.
FDConfig _config = FDConfig(FDPlatform.ALL);
- Present the dialog via
showDialog.
Future<void> _showDialog(BuildContext context) {
return showDialog<void>(
context: context,
builder: (BuildContext context) {
return FDBasicDialog(
config: _config,
title: "Title",
content: "Description",
buttonTitle: "OK",
onPressed: (dialog) {
// Print host OS
print(FDUtils.getHostPlatformOS());
// Dismiss dialog
dialog.dismiss(context);
},
);
},
);
}
Contributing #
- Fork the repo.
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
License #
flutter_dialogs is released under the GNU General Public License v3.0. See LICENSE for details.