toIntRange function Null safety

List<int> toIntRange(
  1. String stringValue
)

Implementation

List<int> toIntRange(String stringValue) {
  final arr = json.decode(stringValue);
  return [int.parse(arr[0] as String), int.parse(arr[1] as String)];
}