modal_dialog 2.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 26

Modal Dialog System

A Modal Dialog System based on the Bootstrap framework.

Install

Edit your pubspec.yaml and add the library dependency:

dependencies:
  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>
<html>
<head>
</head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" 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...');
    dialog.close();
  });
  dialog.open();
}

Examples

  1. Creates a Modal Message with two buttons:
new ModalMessage('Delete record', 'Are you sure?')
  ..addButton('Cancel')
  ..addButton('Accept', type: 'primary', action: (ModalDialog dialog) {
    print('Deleting record..');
    dialog.close();
  })
  ..open();
  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..');
  dialog.close();
})..open();

modal_confirm

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

modal_alert

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:


dependencies:
  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
Popularity:
Describes how popular the package is relative to other packages. [more]
51
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
26
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.

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 https://www.dartlang.org/dart-2#migration.

Dependencies

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