extension_type_unions 1.0.2 copy "extension_type_unions: ^1.0.2" to clipboard
extension_type_unions: ^1.0.2 copied to clipboard

Simple union types. The package provides the extension types `Union2 ... Union9`, modeling a simple kind of union types. The union of `int` and `String` can be specified as `Union2<int, String>`. An e [...]

1.0.1 #

  • Improved the description in pubspec.yaml.

1.0.0 #

  • Initial version.
7
likes
0
pub points
60%
popularity

Publisher

unverified uploader

Simple union types. The package provides the extension types `Union2 ... Union9`, modeling a simple kind of union types. The union of `int` and `String` can be specified as `Union2<int, String>`. An expression with a union type can be obtained by calling a constructor like `Union2<int, String>.in1(42)` or `Union2<int, String>.in2('foo')`. A more concise form uses an extension getter, e.g., `42.u21`, `'foo'.u22` (`u2` means `Union2`, and the last digit specifies the chosen type, e.g., `1` for `int`).

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on extension_type_unions