Clients that want to flow top-level tool and analytics suppression to sub-tools via the system environment will benefit from a few shared utility methods.
Tentatively:
/// Compute whether to suppress analytics based on the environment variable
/// `DASH__SUPPRESS_ANALYTICS`.
bool computeSuppressAnalytics({bool defaultValue = false})
/// Compute the top-level tool from the environment variable `DASH__TOOL`.
DashTool computeTopLevelTool(DashTool current)
and a new enum:
/// Environment variables used by the unified analytics package.
enum DashEnvVar {
/// Environment variable used to suppress analytics.
suppressAnalytics('DASH__SUPPRESS_ANALYTICS'),
/// Environment variable used to specify the top-level tool.
tool('DASH__TOOL');
final String name;
const DashEnvVar(this.name);
}
Clients that want to flow top-level tool and analytics suppression to sub-tools via the system environment will benefit from a few shared utility methods.
Tentatively:
and a new enum: