getBundle method

Bundle getBundle(
  1. String key
)

Force-gets the value for the given key, throws if null or wrong type

Implementation

Bundle getBundle(String key) {
  final value = _internalMap[key];
  if (value is Bundle) return value;
  if (value is Map<Object?, Object?>) return Bundle.from(value);

  throw FormatException('$value is not a bundle');
}