fromRawAttribute method
Implementation
@override
List<int> fromRawAttribute(AttributeProvider provider, Object attr) {
switch (attr) {
case List<int> _:
return attr;
case String _:
return attr.split(",").mapList((e) => e.toInt).nonNullList;
case List<String> _:
return attr.map((e) => e.toInt).nonNullList;
case List<dynamic> ls:
return ls.map((e) {
return switch (e) {
int n => n,
num m => m.toInt(),
String s => s.toInt,
_ => null,
};
}).nonNullList;
default:
typeError(List<int>, attr);
}
}