l method

List l(
  1. String key, {
  2. List defaultValue = const [],
  3. bool showLog = true,
})

获取 value 转 bool

Implementation

List l(String key, {List defaultValue = const [], bool showLog = true}) {
  if (!containsKey(key)) {
    _log('当前map不存在 key:[$key]', showLog);
    return defaultValue;
  }
  final value = this[key];
  if (value is List) return value;
  _log('${value.runtimeType} [$key]=$value => list:$defaultValue', showLog);
  return defaultValue;
}