# RequiresFlag

Artifact: [androidx.annotation:annotation](https://developer.android.com/jetpack/androidx/releases/annotation) [View Source](https://cs.android.com/search?q=file:androidx/annotation/RequiresFlag.jvm.kt+class:androidx.annotation.RequiresFlag) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.10.0)

*** ** * ** ***

Common/AllAndroid/JVM
- android

  ```
  @MustBeDocumented
  @Retention(value = AnnotationRetention.BINARY)
  @Target(allowedTargets = [AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD, AnnotationTarget.FILE])
  annotation RequiresFlag
  ```

*** ** * ** ***

Indicates an API is part of a feature that is guarded by an aconfig flag, and only available if the flag is enabled.

Unless the API has been finalized and has become part of the SDK, callers of the annotated API must check that the flag is enabled before making any assumptions about the existence of the API.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFlag#RequiresFlag(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFlag#value()` The string value for the aconfig flag used to guard the feature this API is part of, for example `"android.os.flags.my_feature"`. | android |

## Public constructors

### RequiresFlag

android Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.10.0)

```
RequiresFlag(value: String)
```

## Public properties

### value

android

```
val value: String
```

The string value for the aconfig flag used to guard the feature this API is part of, for example `"android.os.flags.my_feature"`.