minBy<T> function
Implementation
T minBy<T>(Iterable<T> list, num Function(T) convert) {
if ( list.isEmpty) {
throw FlutterError('List Is Empty');
}
num v=convert.call(list.first);
T result=list.first;
for (var v2 in list) {
var tv = convert.call(v2);
if(tv.compareTo(v)<0){
v = tv;
result = v2;
}
}
return result;
}