dart_internal 0.1.1 copy "dart_internal: ^0.1.1" to clipboard
dart_internal: ^0.1.1 copied to clipboard

outdated

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 a [...]

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add dart_internal

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  dart_internal: ^0.1.1

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

Import it

Now in your Dart code, you can use:

import 'package:dart_internal/extract_type_arguments.dart';
0
likes
0
pub points
85%
popularity

Publisher

verified publisherlabs.dart.dev

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.

Homepage

License

unknown (LICENSE)

More

Packages that depend on dart_internal