Dart Extensions

Adds several extensions

classDescription
GeoPointDefines a geographical point.
GeoBoundsA latitude/longitude aligned rectangle.
CompositeMapSubscriptionActs as a map for multiple subscriptions that can be canceled at once.
ReadableFileImplement a multi platform interface to be able to read a file.
DurationBuilderBuilder for Duration
DateTimeBuilderBuilder for DateTime
UriBuilderBuilder for Uri

- Color

Extensions color code we thank "TinyColor"

- String

CommandDescription
ifEmpty(() => 'text')if string is empty returns a 'text' otherwise return string
isBlankif string is empty or contains only space returns true otherwise returns false
ifBlank(() => 'text')if string is empty or contains only space returns 'text' otherwise returns string
more methods... please complete this list...

- num

They are extended with the methods of the 'math' package

- Iterable< T > (BUILT)

CommandDescription
nullIfEmptyreturns null or if it is empty returns true.
replacesreplace the old elements contained in the map with new ones.
withoutReturns a iterable without bad elements.
joinByConcatenates the elements given by function.
joinElementConcatenates the elements.
tryFirstReturns the first element if it exists otherwise null.
tryLastReturns the last element if it exists otherwise null.
containsAllReturns true if the specified value is equal to at least one element.
groupBySplits a list into sub-lists stored in an object, based on the result.
generateMapGenerate the map by collection.
- Iterable< num/int/double/BigInt/Rational >
CommandDescription
sumAllCalculate the sum of all numbers in the collection
subtractAllCalculate the subtraction of all numbers in the collection
divideAllCalculate the division of all numbers in the collection
multiplyAllCalculate the multiplication of all numbers in the collection
sumSum number to all items in the collection
subtractSubtract number to all items in the collection
divideDivide number to all items in the collection
multiplyMultiply number to all items in the collection
averageCalculate the average of all numbers in the collection
- Iterable< MapEntry< K, V > > (BUILT)
CommandDescription
toMapConvert the collection of entries into a Map.
toMapListGrouping the results in list according to key.
keysReturns only the keys.
valuesReturns only the values.
- Iterable< Future< T > >
CommandDescription
waitFuturessame as Future.wait method
anyFuturessame as Future.any method
- Iterable< GeoPoint >
CommandDescription
centerCalculate a center.
northeastCalculate the northeast corner.
southwestCalculate the southwest corner.
internalBoundsCalculate the internal corners.
externalBoundsCalculate the external corners.

- Map< K, V > (BUILT)

CommandDescription
generateIterable<K, V>(T Function(K key, V value) generator)returns a List from entries
whereReturns a new map with all entries that satisfy the predicate test.
firstWhereReturns the first entry that satisfies the given predicate test.
lastWhereReturns the last entry that satisfies the given predicate test.
tryFirstReturns the first entry if it exists otherwise null.
tryLastReturns the last entry if it exists otherwise null.
reduceReduces a map to a single value by iteratively combining entries.
everyChecks whether every entry of this map satisfies test.
anyChecks whether any entry of this map satisfies test.
foldReduces a map to a single value by iteratively combining entries.

- DateTime (DateTimeBuilder)

See time package

CommandDescription
DateTime.copyWithPosition

- Duration (DurationBuilder)

See time package

CommandDescription
daysHuman days representation (0 -> ...)
hoursHuman hours representation (0 -> 24)
minutesHuman minutes representation (0 -> 59)
secondsHuman seconds representation (0 -> 59)
millisecondsHuman milliseconds representation (0 -> 999)
microsecondsHuman microseconds representation (0 -> 999)
copyWithCopy this with new values
toBuilderConverts this in builder
rebuildUpdate this by DurationBuilder

- Stream< T >

CommandDescription
distinctRuntimeTypeStream.distinct] by T.runtimeType.
listenValueChangesHear how the specified value changes over time from its previous value.

Built

ClassDescription
GeoPointSerializerSerializer for GeoPoint Type
LocaleSerializerSerializer for the Locale type
ByPassSerializerSerializer that does not serialize and deserialize the specified type T

- Serializers

CommandDescription
serializeAllSerialize the collection of objects
serializeAllWithSerialize the collection of objects using Serializer.
deserializeAllDeserialize the collection of objects.
deserializeAllWithDeserialize the collection of objects using Serializer.

Libraries

built_extensions
path_extensions
pure_extensions