get<T> static method

T? get<T>(
  1. String key, [
  2. T? fallback
])

Get value by key.

Return fallback if not found, or null if fallback is not provided.

Implementation

static T? get<T>(String key, [T? fallback]) {
  assert(_box != null, 'call "prelude" first');
  return _box!.get(key, defaultValue: fallback) as T?;
}