dart_type_extensions 0.0.1 copy "dart_type_extensions: ^0.0.1" to clipboard
dart_type_extensions: ^0.0.1 copied to clipboard

A set of useful extensions on FLutter

dart_type_extensions #

A set of useful extensions on FLutter

A set of extensions on Flutter and Dart type #

Include: context, dateTime, int, string, list, iterable, map, object, widget

int #

Duration get seconds

Duration get milliseconds

Duration get hours

Duration get minutes

void toMinutesDelay(Function computation)

void toSecondsDelay(Function computation)

void toMillisecondsDelay(Function computation)

     5.toSecondsDelay(() {
        print("after 5 sec");
     });

String #

String get reverse

List

List

String truncateWithEllipsis(int cutoff)

String get capitalize

String withCounter(int number)

double toDouble([double defaultValue = 0.0])

int get toInt

Object #

to avoid cast exception

int get castToInt

double get castToDouble

String get castToString

bool get castToBool

bool get castToList

bool get castToMap

bool get isNull

bool get isNotNull

bool get isNullOrEmpty

bool get isNullEmptyOrFalse

bool get isNullEmptyFalseOrZero

Widget #

Widget paddingAll(double padding)

Widget paddingHorizontal(double padding)

...

Widget paddingRight(double padding)

DateTime #

bool isBetween({DateTime startAt, DateTime endAt})

bool get isToday

bool get isPassed

Iterable #

Iterable

List #

List

bool replace(E element, E replacement)

bool replaceWhere(Function(E e) getCondition, E replacement)

List

List

List

E safeGet(int index)

bool compare(List listB)

bool compareBy(List

int countItem(E item)

num maxElement()

num minElement()

Map #

Map<dynamic, dynamic> get reverse

bool getBool(String key)

int getInt(String key)

double getDouble(String key)

String getString(String key)

List

Context #

has extensions for some types below

MediaQueryExt

NavigatorExt

ThemeExt

ScaffoldExt

1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A set of useful extensions on FLutter

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on dart_type_extensions