parseViewBox function
Implementation
Rect? parseViewBox(String viewBoxString) {
final array = viewBoxString.split(' ');
final left = double.tryParse(array[0]);
final top = double.tryParse(array[1]);
final width = double.tryParse(array[2]);
final height = double.tryParse(array[3]);
if (left != null && top != null && width != null && height != null) {
return Rect.fromLTWH(left, top, width, height);
}
return null;
}