createFromString static method
Implementation
static SizedElement? createFromString(String s) {
if (s.contains('xy:')) {
return XY(s);
}
if (s.contains('size:')) {
return Size(s);
}
if (s.contains('orig:')) {
return Orig(s);
}
if (s.contains('offset:')) {
return Offset(s);
}
return null;
}