setMode method
Switches the active mode for the currently-displayed origin. Looks
the key up in the origin's modes map, 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
void setMode(Object? mode) => _stage._setMode(mode);