value<T> static method

T? value<T>(
  1. String key,
  2. dynamic source
)

Returns the value associated with the given key from the source, cast to the specified type.

Implementation

static T? value<T>(String key, dynamic source) {
  final data = _v(key, source);
  if (data is T) {
    return data;
  } else {
    return null;
  }
}