modal_dialog 2.0.0

  • Installing
  • Versions
  • 0

Modal Dialog System #

A Modal Dialog System based on the Bootstrap framework.

Install #

Edit your pubspec.yaml and add the library dependency:

  modal_dialog: <version number>

Gets the dependencies:

> pub get

Adds the Bootstrap's CSS link to your web page (see Getting started - Bootstrap):

<!DOCTYPE html>
    <link rel="stylesheet" href="" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    Alternatively you can use the minified CSS file provided by the Bootjack library:
    <link rel="stylesheet" href="packages/bootjack/css/bootstrap.min.css">

And finally import the library from the source code:

import 'package:modal_dialog/core.dart';

void main() {
  ModalDialog dialog = new ModalConfirm('Delete record', 'Are you sure?',
      accept: (ModalDialog dialog) {
    print('deleting record...');

Examples #

  1. Creates a Modal Message with two buttons:
new ModalMessage('Delete record', 'Are you sure?')
  ..addButton('Accept', type: 'primary', action: (ModalDialog dialog) {
    print('Deleting record..');
  1. The previous example can be written easily by using the ModalConfirm class:
new ModalConfirm('Delete record', 'Are you sure?',
    accept: (ModalDialog dialog) {
  print('Deleting record..');


  1. Creates a Modal Alert message:
new ModalAlert('Error', 'An error has occurred');


Changelog #

0.0.1 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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

  modal_dialog: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:modal_dialog/modal_dialog.dart';
Version Uploaded Documentation Archive
2.0.0 Aug 6, 2016 Go to the documentation of modal_dialog 2.0.0 Download modal_dialog 2.0.0 archive
1.0.0 Aug 4, 2016 Go to the documentation of modal_dialog 1.0.0 Download modal_dialog 1.0.0 archive
0.0.1 Aug 3, 2016 Go to the documentation of modal_dialog 0.0.1 Download modal_dialog 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0