byte_flow library

Functions

capitalize(String text) → String
Capitalizes the given string
chunk(List array, [int size = 1]) → List
Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements. Example [...]
compact(List array) → List
Creates an array with all falsey values removed. The values false, null, 0, "", and NaN are falsey. Example [...]
drop(List array, [int n = 1]) → List
Creates a slice of array with n elements dropped from the beginning. [...]
dropRight(List array, [int n = 1]) → List
Creates a slice of array with n elements dropRightped from the beginning. [...]
duplicate(List array) → List
Find duplicate items in an array
fill(List array, dynamic value, [int start = 0, int end]) → List
Fills elements of array with value from start up to, but not including, end. Example [...]
findIndex(List array, dynamic element) → int
This method uses dart's default List.indexOf Example [...]
findLastIndex(List array, dynamic element) → int
This method finds the item in the array from right / last using dart's List.indexOf() method Example [...]
flatten(List array) → List
Flatten a list [...]
Finds the first element in the array Uses dart's List.first property Example [...]
initial(List array) → List
Gets all but the last element of array. Example [...]
intersect(List<List> arrays) → dynamic
Creates an array of unique values that are included in all given arrays Example [...]
join(List array, [String separator = ',']) → String
Converts all elements in array into a string separated by separator. Uses dart's List.join() Example [...]
last(List array) → dynamic
Gets the last element of array. Uses dart's List.last property Example [...]
map(List array, dynamic iteratee(dynamic element, int index, List array)) → List
Creates an array of values by running each element of array thru iteratee. The iteratee is invoked with three arguments: (value, index, array). [...]
nth(List array, int n) → dynamic
Gets the element at index n of array. If n is negative, the nth element from the end is returned. Example [...]
pairs(List pairs) → Map
This method returns an object composed from key-value pairs. Example [...]
slice(List array, [int start = 0, int end]) → List
Creates a slice of array from start up to, but not including, end. Example [...]
sortedIndex(List array, dynamic value) → int
Uses a binary search to determine the lowest index at which value should be inserted into array in order to maintain its sort order. Returns the index at which value should be inserted into array. Example [...]
tail(List array) → List
Gets all but the first element of array. Example [...]
take(List array, [int n = 1]) → List
Creates a slice of array with n elements taken from the beginning. Uses dart's native List.take(n) method Example [...]
takeRight(List array, [int n = 1]) → List
Creates a slice of array with n elements taken from the end. Example [...]
union(List<List> arrays) → dynamic
Creates an array of unique values, in order [...]
unzip(List array) → List
This method Returns the new array of regrouped elements Example [...]
zip(List a, List b) → List
Zips two arrays Credit [...]