shmy / native_alert

A Flutter plugin to trigger native alert and confirm dialogs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Native Dialog

A Flutter plugin to trigger native alert and confirm dialogs.

CircleCI

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

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

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

About

A Flutter plugin to trigger native alert and confirm dialogs.

License:MIT License


Languages

Language:Dart 35.7%Language:HTML 19.0%Language:Swift 15.5%Language:Kotlin 15.1%Language:Ruby 11.3%Language:Objective-C 2.5%Language:Shell 0.6%Language:JavaScript 0.3%