asCast<T> method
T
asCast<T>(
- dynamic value
inherited
Implementation
T asCast<T>(dynamic value) {
if (T == int && value is double) {
return value.toInt() as T;
} else if (T == double && value is int) {
return value.toDouble() as T;
}
return value as T;
}