valueFromMap method

dynamic valueFromMap(
  1. Map<String, dynamic> map,
  2. String key,
  3. dynamic value
)

从cupertino获取key对应的值, 如果为null取value的值, 如果还是null则取material里的值

Implementation

dynamic valueFromMap(Map<String, dynamic> map, String key, dynamic value) {
  return map != null ? map[key] ?? value : value;
}