asDoubles method

double asDoubles(
  1. List<String> keys
)

Implementation

double asDoubles(List<String> keys) {
  for (final String key in keys) {
    final value = this[key];
    if (value == null) {
      continue;
    }
    if (value is double) {
      return value;
    }
    try {
      String value0 = value.toString();
      if (value0.isEmpty) {
        return 0;
      }
      final result = double.parse(value0);
      return result;
    } catch (e) {
      _print('json 解析异常,异常值,期望double值:"$key":$value');
    }
  }
  return 0.0;
}