Optional.dart is an implementation of the
Optional type, inspired by Java 8's Optional class.
Optional.empty()constructor is now
Presentare now subclasses of
Optional. You should continue to use constructors in
Optional, and not the
EMPTYis now a top-level constant.
Optional.empty()constructors are now
Optional.of()constructor now throws
ArgumentErrorwhen passed null, instead of
Add this to your package's pubspec.yaml file:
dependencies: optional: "^2.0.1+2"
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|2.0.1+2||Jun 6, 2018|
|2.0.1+1||Jun 6, 2018|
|2.0.1||Jun 6, 2018|
|2.0.0||Jun 6, 2018|
|1.2.3+1||Dec 15, 2015|
|1.2.3||Dec 15, 2015|
|1.2.2||Oct 2, 2014|
|1.2.1+4||Sep 14, 2014|
|1.2.1+3||Sep 12, 2014|
|1.2.1+2||Sep 12, 2014|
We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
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]
Detected platforms: Flutter, web, other
No platform restriction found in primary library
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Fix analysis and formatting issues.
Analysis or formatting checks reported 5 hints.
Similar analysis of the following files failed:
Maintain an example.
None of the files in your
example/directory matches a known example patterns. Common file name patterns include:
example.dartor you could also use