toListOfString static method

List<String> toListOfString(
  1. dynamic d
)

Converts to not-nullable list of strings from dynamic

Implementation

static List<String> toListOfString(dynamic d) {
  final jsonList = Convert.toListN(d);
  final List<String> result = [];
  if (jsonList != null) {
    jsonList.forEach((e) {
      final s = Convert.toStrN(e);
      if (s != null) {
        result.add(s);
      }
    });
  }
  return result;
}