Last updated:
0 purchases
sesame
Sesame #
Features #
Useful extension methods for Dart collections.
Getting started #
Add the following to your pubspec.yaml:
dependencies:
sesame: any
copied to clipboard
Usage #
Extensions #
A set of useful extension methods for Dart collections.
MapGetOr
import 'package:sesame/extensions.dart';
final map = {"fruit":"apple"};
final fruitOrDefaultValue = map.getOrElse("fruit", "orange"); // apple
final vegetableOrDefaultValue = map.getOrElse("vegetable", "lettuce"); // lettuce
final fruitOrNull = map.getOrNull("fruit"); // apple
final vegetableOrNull = map.getOrNull("vegetable"); //null
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.