asListOfString function

List<String>? asListOfString(
  1. Object? o
)

Returns o as a List<String>. Converts it if needed.

Implementation

List<String>? asListOfString(Object? o) {
  if (o == null) return null;
  var l = o as List<Object?>;
  return l.map((e) => e != null ? e.toString() : '').toList();
}