unwrap method

Map<K, V> unwrap()

Returns the non-reactive map value.

This method provides direct access to the underlying map. It's useful when you need to pass the map to APIs that don't work with Reactive.

Note: Changes to the returned map won't automatically trigger notifications. You need to trigger a notification manually by reassigning the map to the reactive value, for example: reactive.value = Map.from(reactive.value).

Example:

final config = {'debug': true, 'logLevel': 'info'}.reactive;

// Get the raw map
final rawMap = config.unwrap();
print(rawMap); // {debug: true, logLevel: info}

// Use with APIs that require a regular map
someFunction(config.unwrap());

Implementation

Map<K, V> unwrap() {
  return value;
}