lean_extensions library

Extensions and converters to facilitate data modeling with minimal dependencies.

Classes

AnyBoolConverter
Converts Object? into bool using its "truthy" value
AnyDateConverter
converts to DateTime without the time component
AnyDateTimeConverter
converts to DateTime
AnyDoubleConverter
converts to double
AnyIntConverter
converts to int
AnyNullableBoolConverter
Converts Object? into bool? using its "truthy" value
AnyNullableDateConverter
converts to nullable DateTime without the time component
AnyNullableDateTimeConverter
converts to nullable DateTime
AnyNullableDoubleConverter
converts to nullable double
AnyNullableIntConverter
converts to nullable int
AnyNullableNumConverter
converts to nullable num
AnyNullableStringConverter
casts into nullable string
AnyNumConverter
converts to num
AnyStringConverter
casts into string if not null, otherwise casts to empty string
AnyUriConverter
converts to Uri
AnyUriOrNullConverter
converts to Uri if not null, otherwise returns null
ToDynamicConverter<T>
A convenience wrapper around JsonConverter that implement default toJson()

Extensions

BigIntLeanExtensions on BigInt
adds extensions to BigInt
ComparableExtensions on T
adds limit extensions on Comparable
DateExtensions on DateTime
adds utility methods to DateTime
DoubleExtensions on double
includes ComparableExtensions on double
IntExtensions on int
includes ComparableExtensions on double
IterableExtensions on Iterable<T>
adds utility methods to Iterable
IterableOrNullExtensions on Iterable<T>?
adds utility methods to Iterable
MapLeanExtension on Map<K, V>
extensions on Map with a lot of recursion; needs more testing
NullableMapLeanExtension on Map<K, V>?
extensions on Map?
NullableObjectLeanExtensions on Object?
adds "truthy" / "falsy" extensions
NumExtensions on num
adds utility methods to num
ObjectLeanExtensions on Object
adds extensions on non-nullable Object
RandomExtensions on Random
adds utility methods on Random to generate strings
StringExtensions on String
adds utility methods to String
StringOrNullExtensions on String?
adds utility methods to String?