chart_xutil
library
Functions
-
ave(Iterable<num> list)
→ num
-
-
aveBy<T>(Iterable<T> list, num call(T))
→ num
-
-
buildDateRange(DateTime start, DateTime end, bool include)
→ List<DateTime>
-
-
chunk<T>(Iterable<T>? list, [int size = 1])
→ List<List<T>>
-
-
clamp(num lower, num upper)
→ num
-
-
computeDayDiff(DateTime start, DateTime end)
→ int
-
-
concat<T>(Iterable<T>? iterable, [Iterable<T>? i2, Iterable<T>? i3, Iterable<T>? i4, Iterable<T>? i5, Iterable<T>? i6, Iterable<T>? i7, Iterable<T>? i8, Iterable<T>? i9, Iterable<T>? i10])
→ List<T>
-
-
concat2<T>(Iterable<Iterable<T>> iterable)
→ List<T>
-
-
convertTree<T extends TreeNode<T>, D extends TreeNode<D>>(T tree, D build(D?, T), {D? parent})
→ D
-
-
difference<T>(Iterable<T>? list, [Iterable<T>? values])
→ List<T>
-
-
differenceBy<T, K>(Iterable<T>? list, [Iterable<T>? values, K call(T)?])
→ List<T>
-
-
differenceWith<T>(Iterable<T>? list, [Iterable<T>? values, bool comparator(T, T)?])
→ List<T>
-
-
drop<T>(List<T>? list, [int n = 1])
→ void
-
去除该List前n个元素
-
dropRight<T>(List<T>? list, [int n = 1])
→ void
-
-
dropRightWhen<T>(List<T>? list, bool call(T, int, List<T>))
→ void
-
-
dropWhen<T>(List<T>? list, bool call(T, int, List<T>))
→ void
-
-
each<T>(Iterable<T> list, void call(T, int))
→ void
-
-
eachRight<T>(Iterable<T> list, void call(T, int))
→ void
-
-
every<T>(Iterable<T> list, bool call(T))
→ bool
-
判断列表里面的元素是否都满足条件
-
extremes<T>(Iterable<T> list, num call(T))
→ List<num>
-
-
fill<T>(List<T> list, Iterable<T> values, [int start = 0, int? end])
→ void
-
-
find<T>(Iterable<T> list, bool call(T))
→ T?
-
-
findLast<T>(Iterable<T> list, bool call(T))
→ T?
-
-
flatten<T>(Iterable list)
→ List<T>
-
将给定的嵌套数组全部合并成一层数组
-
formatNumber(num number, [int fractionDigits = 2])
→ String
-
-
groupBy<T, K>(Iterable<T> list, K convert(T))
→ Map<K, List<T>>
-
分组
-
intersection<T>(Iterable<Iterable<T>> list)
→ List<T>
-
返回所有数据中都有的数据(交集)
-
intersectionWhen<T>(Iterable<Iterable<T>> list, bool compare(T, T))
→ List<T>
-
同上(后续优化)
-
isTrue(dynamic obj)
→ bool
-
模拟js 对象为真判断
判断一个数是否为真(0,"",null为假)
-
jsAnd(dynamic a, dynamic b)
→ dynamic
-
模拟javaScript a&& b的返回值
-
jsAnd2(dynamic a, dynamic b)
→ bool
-
-
jsIf2(bool a)
→ int
-
模拟js 三目运算符返回结果
-
jsOr(dynamic a, dynamic b)
→ dynamic
-
模拟javaScript a|| b的返回值
-
jsOr2(num a, num b)
→ bool
-
-
log10(num v)
→ num
-
-
map2<T, K>(Iterable<T> list, K convert(T))
→ List<K>
-
-
max(Iterable<num> list)
→ num
-
-
maxBy<T>(Iterable<T> list, num convert(T))
→ T
-
-
medium(Iterable<num> list)
→ num
-
中位数
-
mediumBy<T>(Iterable<T> list, num call(T))
→ num
-
-
min(Iterable<num> list)
→ num
-
-
minBy<T>(Iterable<T> list, num convert(T))
→ T
-
-
padLeft(int c, int width, [String fill = ''])
→ String
-
-
padRight(int c, int width, [String fill = ''])
→ String
-
-
pull<T>(Iterable<T> list, Iterable<T> values)
→ void
-
删除List中在 values中出现的值
-
range(int start, int end, [int step = 1])
→ List<int>
-
-
reduce<T>(Iterable<T> list, num call(num, T), [num initValue = 0])
→ num
-
-
reduce2<T, K>(Iterable<T> list, K call(K, T), K initValue)
→ K
-
-
reverse2<T>(List<T> list)
→ List<T>
-
-
reverseSelf<T>(List<T> list)
→ void
-
-
some<T>(Iterable<T> list, bool call(T))
→ bool
-
判断集合中的元素是否存在
-
sum(Iterable<num> list)
→ num
-
-
sumBy<T>(Iterable<T> list, num call(T))
→ num
-
-
toTree<D, T extends TreeNode<T>>(D data, List<D> childrenCallback(D), T build(T?, D), {int deep = 0, T? parent, int sort(T, T)?})
→ T
-
-
union<T>(Iterable<Iterable<T>> list)
→ List<T>
-
返回一个按顺序排列的唯一值的List
-
unionBy<T, K>(Iterable<Iterable<T>> list, K? convert(T))
→ List<T>
-
-
uniq<T>(Iterable<T> list)
→ List<T>
-
创建一个去重后的数组
-
uniqBy<T, K>(Iterable<T> list, K? convert(T))
→ List<T>
-
-
withOut<T>(Iterable<T> list, Iterable<T> values)
→ List<T>
-
创建一个剔除所有给定值的新数组
-
xor<T>(Iterable<Iterable<T>> list)
→ List<T>
-
返回一个由给定数据生成的唯一值的数组
-
xorBy<T, K>(Iterable<Iterable<T>> list, K convert(T))
→ List<T>
-