h_utils 0.0.4

Flutter Android iOS web

Extend you code beyond reach with HUtils.

H(elpful)Utils #

Release Pub This is a work in progress

About #

This is a set of helper classes I feel that Dart was missing.

Disclaimer keep in mind that this is made for personal use only.

Features #

Usage #

Date & Time #

Control Flow #

Method

A function that takes an input of type I and returns a value of O.

typedef Method<I, O> = O Function(I);  

Usage

final Method<int, String> method = (int input) => int.toString();

Value

final Method<dynamic, int> method = value(2);
method(4); // returns 2

Map

final Method<int, int> method = (int input) => int * 2;
method.map((number) => number / 2)(4); // returns 4

Also

final Method<String, String> method = (String input) => "Hello $input";
final Method<String, String> printedMethod = method.also((String input) => print(input));
also("World"); // prints World, returns Hello World

Format

final Method<String, String> method = (String input) => "Hello $input";
method.format("{}, how are you?")("World"); // returns Hello World, how are you?

ForEach

final Method<String, String> method = (String input) => "Hello $input";
method.format("{}, how are you?")("World"); // Hello World, how are you?

Supplier

Consumer

Predicate

Runnable

Switcher

Optional

Either

Immutability #

2
likes
70
pub points
45%
popularity

Extend you code beyond reach with HUtils.

Homepage

Documentation

API reference

Uploader

robert.moeller@booza.app

License

MIT (LICENSE)

Dependencies

date_format, equatable, flutter

More

Packages that depend on h_utils