setMode property
Switches the active mode for the currently-displayed origin. Looks
the key up in the origin's modes map (registered via
setOriginConfig), merges with the origin's default config, and
swaps displayConfig. Passing null returns to the default config.
Useful for letting consumer-side UI (e.g., an appbar's Back button) exit a tool mode without dismissing the displayed origin.
Implementation
final ValueSetter<Object?> setMode;