dart_multimethod

Creator: coderz1093

Last updated:

0 purchases

dart_multimethod Image
dart_multimethod Images

Languages

Categories

Add to Cart

Description:

dart multimethod

dart_multimethod #
dart_multimethod is a package that provides multimethods for Dart.
Features #

multimethod functions

Getting started #
Installation #
Add dart_multimethod to your pubspec.yaml file:
dependencies:
dart_multimethod: ^0.0.2
copied to clipboard
Import #
import 'package:dart_multimethod/dart_multimethod.dart';
copied to clipboard
Usage #
Basic usage #
import 'package:dart_multimethod/dart_multimethod.dart';

final area = Multimethod<String, MyClass, String>((o) => o.name).when('first', (o) => '${o.name} square');
print(area(MyClass('first'))); // first square
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.