UPoint.from constructor
UPoint.from(
- dynamic value
Implementation
factory UPoint.from(dynamic value) {
if (value is UPoint) {
return UPoint(value.x, value.y);
}
if (value is List<num>) {
if (value.length == 2) {
return UPoint(value[0].toDouble(), value[1].toDouble());
}
}
throw Exception("Invalid values!");
}