onEnvironmentChanged property
set
onEnvironmentChanged
(void callback(String? name)?)
Called after the environment is switched (null = app default).
A good place to log the user out if sessions don't carry over.
Implementation
static set onEnvironmentChanged(void Function(String? name)? callback) =>
DebugEnvironments.instance.onChanged = callback;