get<T> static method

T? get<T>(
  1. String key, {
  2. T? defaultValue,
})

Get config value for current tenant

Implementation

static T? get<T>(String key, {T? defaultValue}) {
  final context = tenantStore.currentContext;
  if (context == null) return defaultValue;

  final value = context.config[key];
  return value is T ? value : defaultValue;
}