An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# Native Dialog

A Flutter plugin to trigger native alert and confirm dialogs.

[![CircleCI](https://circleci.com/gh/yujiosaka/native_alert.svg?style=shield)](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

android-alert

#### iOS

ios-alert

#### Web

web-alert

### 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

android-confirm

#### iOS

ios-confirm

#### Web

web-confirm