value property

T? get value

Implementation

T? get value {
  if (isBoolean) {
    return FeatureManager.instance.isEnabled(this as Feature<bool>) as T?;
  } else if (isText) {
    return FeatureManager.instance.getString(this as Feature<String>) as T?;
  } else if (isDouble) {
    return FeatureManager.instance.getDouble(this as Feature<double>) as T?;
  } else if (isInteger) {
    return FeatureManager.instance.getInt(this as Feature<int>) as T?;
  } else if (isJson) {
    return FeatureManager.instance
        .getJson(this as Feature<Map<String, dynamic>>) as T?;
  } else {
    throw Exception('Unsupported feature type');
  }
}