stringListFor method

List<String> stringListFor(
  1. AFConfigurationItem entry
)

Implementation

List<String> stringListFor(AFConfigurationItem entry) {
  final result = valueFor(entry);
  if(result is String) {
    return [result];
  }
  if(result is List) {
    if(result.isEmpty) {
      return <String>[];
    }
    return result.map((x) => x.toString()).toList();
  }
  throw AFException("Unexpected data type ${result.runtimeType} for entry ${entry.name}");
}