getProperty<T> method

T? getProperty<T>(
  1. String key, [
  2. T? defaultValue
])

Retrieves the value specified by key from properties.

defaultValue will be returned if key does not exist.

The value obtained may not be the latest.

Implementation

T? getProperty<T>(String key, [T? defaultValue]) =>
    _properties.unsafeValue.containsKey(key)
    ? _properties.unsafeValue[key] as T?
    : defaultValue;