stringListFromJson function

List<String> stringListFromJson(
  1. dynamic json, {
  2. bool growable = false,
})

Implementation

List<String> stringListFromJson(dynamic json, {bool growable = false,}) {
  final result = <String>[];
  if (json is List && json.isNotEmpty) {
    for (final row in json) {
      final value = row as String;
      result.add(value);
    }
  }
  return result.toList(growable: growable);
}