morpheme_extension 1.1.0 copy "morpheme_extension: ^1.1.0" to clipboard
morpheme_extension: ^1.1.0 copied to clipboard

Superpowers for Dart. Collection of useful static extension methods.

example/main.dart

// ignore_for_file: avoid_print

import 'package:morpheme_extension/morpheme_extension.dart';

void main() {
  String? getValue() => '1';
  final value = getValue();

  value?.run((it) => print(it));
  final let = value?.let((it) => int.parse(it));
  print(let);

  int itValue = 0;
  final also = value?.also((it) {
    itValue = int.parse(it);
  });

  print(also);
  print(itValue);
}
2
likes
160
pub points
55%
popularity

Publisher

verified publishermorpheme.design

Superpowers for Dart. Collection of useful static extension methods.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, time

More

Packages that depend on morpheme_extension