dialog_polyfill 0.4.3-1

  • README.md
  • Example
  • Installing
  • Versions
  • 30

dialog_polyfill

Dart package for dialog-polyfill.js.

Usage

<head>
  <script type="text/javascript" src="packages/dialog_polyfill/dialog-polyfill.js"></script>
  <link rel="stylesheet" type="text/css" href="packages/dialog_polyfill/dialog-polyfill.css"/>
</head>

example/main.dart

import 'dart:html';
import 'package:dialog_polyfill/dialog_polyfill.dart';

main() {
  var element = querySelector('dialog');
  var dialog = new Dialog(element);

  querySelector('#show').onClick.listen((_) {
    dialog.show();
  });
  querySelector('#show-modal').onClick.listen((_) {
    dialog.showModal();
  });
  querySelector('#close').onClick.listen((_) {
    dialog.close();
  });
}

Use this package as a library

1. Depend on it

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


dependencies:
  dialog_polyfill: ^0.4.3-1

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:dialog_polyfill/dialog_polyfill.dart';
  
Version Uploaded Documentation Archive
0.4.3-1 May 30, 2016 Go to the documentation of dialog_polyfill 0.4.3-1 Download dialog_polyfill 0.4.3-1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
30
Learn more about scoring.

We analyzed this package on Sep 18, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.3

Platforms

Detected platforms: web

Primary library: package:dialog_polyfill/dialog_polyfill.dart with components: html, js.

Issues and suggestions

Package is too old.

The package was released more than two years ago.

Maintain CHANGELOG.md.

Changelog entries help clients to follow the progress in your code.

Add SDK constraint in pubspec.yaml.

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-release.

Pre-release versions should be used with caution, their API may change in breaking ways.

Dependencies

Package Constraint Resolved Available
Dev dependencies
browser any