adaptive_dialog 0.4.0

  • Readme
  • Changelog
  • Example
  • Installing
  • new84

adaptive_dialog #

Show alert dialog or modal action sheet adaptively according to platform.


showOkAlertDialog #

Convenient wrapper of showAlertDialog.

iOSAndroid
n1n2

showOkCancelAlertDialog #

Convenient wrapper of showAlertDialog.

iOSAndroid
n3n4
n5n6

showModalActionSheet #

iOSAndroid
n7n8
n9n10
n11n12

showTextInputDialog #

iOSAndroid
n1n2
n3n4

showTextAnswerDialog #

Show text input dialog until answer is correct or cancelled. This is useful for preventing very destructive action is executed mistakenly.

iOSAndroid
n5n6

0.4.0 #

0.3.1 #

  • Add showDialog2020, which wraps showModal with FadeScaleTransitionConfiguration().

0.3.0 #

  • Use showModal with FadeScaleTransitionConfiguration of animations for Material alert dialog

0.2.2 #

  • Fix showTextAnswerDialog

0.2.1 #

  • Add isDestructiveAction to showTextInputDialog and showTextAnswerDialog

0.2.0 #

  • Add showTextInputDialog
  • Add showTextAnswerDialog

0.1.2 #

  • Change SheetAction's icon to nullable

0.1.1 #

  • Add documentation
  • Change some parameters to nullable

0.1.0 #

  • Initial release

example/lib/main.dart

import 'package:example/router.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'app.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(
    MultiProvider(
      providers: [
        Provider(create: (context) => Router()),
      ],
      child: const App(),
    ),
  );
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  adaptive_dialog: ^0.4.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:adaptive_dialog/adaptive_dialog.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
67
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
84
Learn more about scoring.

We analyzed this package on Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
animations ^1.0.0+5 1.0.0+5
flutter 0.0.0
meta ^1.1.8 1.1.8
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
pedantic_mono any