dart_internal 0.1.1

  • README.md
  • Installing
  • Versions
  • 64

Scary warning: This package is experimental and may deprecated in a future version of Dart.

This package is not intended for wide use. It provides a temporary API to solve the problem: "Given an object some generic type A, how do I construct an instance of generic type B with the same type argument(s)?"

This is necessary in a few rare places in order to migrate existing code to Dart 2's stronger type system. Eventually, the hope is to have direct language support for solving this problem but we don't have time to get that into 2.0, so this package is provided as a temporary workaround.

We will very likely remove support for this in a later version of Dart. Please avoid using this if you can. If you feel you do need to use it, please reach out to @munificent or @leafpetersen and let us know.

Use this package as a library

1. Depend on it

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


dependencies:
  dart_internal: ^0.1.1

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:dart_internal/extract_type_arguments.dart';
  
Version Uploaded Documentation Archive
0.1.1 Mar 1, 2018 Go to the documentation of dart_internal 0.1.1 Download dart_internal 0.1.1 archive
0.1.0 Feb 28, 2018 Go to the documentation of dart_internal 0.1.0 Download dart_internal 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
49
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
64
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: Flutter, web, other

No platform restriction found in libraries.

Issues and suggestions

Maintain CHANGELOG.md.

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

Homepage is not helpful.

Update the homepage property: create a website about the package or use the source repository URL.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use dart_internal.dart.

The description is too long.

Search engines will display only the first part of the description. Try to keep it under 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.12.0 <2.1.0