https://github.com/yujiosaka/native_alert
A Flutter plugin to trigger native alert and confirm dialogs.
https://github.com/yujiosaka/native_alert
Last synced: 6 months ago
JSON representation
A Flutter plugin to trigger native alert and confirm dialogs.
- Host: GitHub
- URL: https://github.com/yujiosaka/native_alert
- Owner: yujiosaka
- License: mit
- Created: 2021-08-30T03:29:39.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-31T01:24:36.000Z (about 4 years ago)
- Last Synced: 2023-08-20T22:36:10.864Z (about 2 years ago)
- Language: Dart
- Size: 157 KB
- Stars: 5
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Native Dialog
A Flutter plugin to trigger native alert and confirm dialogs.
[](https://circleci.com/gh/yujiosaka/native_alert)
## Description
Native Dialog uses the native UI on each platform to show alert and confirm dialogs.
It automatically uses the localized texts for "OK" and "Cancel" buttons.## Usage
### Alert dialog
```dart
import 'package:native_dialog/native_dialog.dart';try {
await NativeDialog.alert("Oops, something went wrong!");
} on PlatformException catch (error) {
print(error.message);
}
```#### Android
#### iOS
#### Web
### Confirm dialog
```dart
import 'package:native_dialog/native_dialog.dart';try {
final confirmed = await NativeDialog.confirm("Do you really want to leave?");
print(confirmed);
} on PlatformException catch (error) {
print(error.message);
}
```#### Android
#### iOS
#### Web
![]()