plain_optional 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • new67

Pub

plain_optional #

plain_optional package defines a type Optional<T> containing an object of type T, optionally. Similar to Optional<T> in Swift.

0.1.3 #

  • Fix map, flatMap, hashCode.

0.1.2 #

  • Add unsafe getter.

0.1.1+1 #

  • Update the package description.

0.1.1 #

  • Add two- and three-argument map and flat-map functions.

0.1.0 #

  • A basic implementation of Optional<T> in Dart.

example/README.md

Example #

A plain_optional package usage example.

Running #

With Dart SDK #

As usual, run pub get first, then pub run example:main.

With Flutter SDK #

As usual, run flutter pub get first, then flutter pub run example:main.

Use this package as a library

1. Depend on it

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


dependencies:
  plain_optional: ^0.1.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:plain_optional/plain_optional.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
meta ^1.1.0 1.1.7
Dev dependencies
test ^1.6.0