plugin 0.2.0+3

  • Installing
  • Versions
  • 92

plugin #

Support for building plugins in Dart.

This project defines a simple framework for defining plugins. A plugin is the unit of extensibility for a host application.

An extension point represents one way of extending the host application. For example, a file viewer application might define an extension point to allow viewers for new file types to be added to the application.

The host application must provide at least one extension point that plugins can extend. Every extension point must have a unique name associated with it, and should specify the type of the objects that will be accepted as extensions. In the example above, the extension point might require that all extensions implement the interface FileViewer.

Any plugin can define extension points that other plugins can extend. The host application contributes its own extension point(s) by defining a plugin.

An extension is an object that a plugin associates with a particular extension point. To continue the example, a plugin that supports the viewing of .gif files would create an instance of GifFileViewer, a class that implements FileViewer.

The framework in this package then connects the defined extensions with the defined extension points so that the separately contributed plugins can coordinate to accomplish the larger goal.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.2.0+3 #

  • Max SDK version bumped to <3.0.0.

0.0.1 #

  • Initial version

Use this package as a library

1. Depend on it

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

  plugin: ^0.2.0+3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:plugin/plugin.dart';
Version Uploaded Documentation Archive
0.2.0+3 Jul 17, 2018 Go to the documentation of plugin 0.2.0+3 Download plugin 0.2.0+3 archive
0.2.0+2 Sep 29, 2017 Go to the documentation of plugin 0.2.0+2 Download plugin 0.2.0+2 archive
0.2.0+1 Jul 20, 2017 Go to the documentation of plugin 0.2.0+1 Download plugin 0.2.0+1 archive
0.2.0 May 10, 2016 Go to the documentation of plugin 0.2.0 Download plugin 0.2.0 archive
0.1.0 Apr 6, 2015 Go to the documentation of plugin 0.1.0 Download plugin 0.1.0 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.

We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:plugin/plugin.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and plugin.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <3.0.0
Dev dependencies
test any