getSentryEnvironment function

String getSentryEnvironment(
  1. AppConfig appConfig
)

Implementation

String getSentryEnvironment(AppConfig appConfig) {
  // AppConfig has variant and environment properties,
  // and they are enums or have a toString method that provides meaningful values.
  return '${appConfig.variant}_${appConfig.environment}'
      .replaceAll('AppVariant.', '')
      .replaceAll('AppEnvironment.', '');
}