CamoForm
Flutter's Form in Compose: the scope CamoFormFields attach to by key. validateMode is the default for
fields that don't set their own; onChanged fires when any field changes. In a lazy list, revealField
scrolls the row for a key into the tree so validate() can focus an off-screen field.
API
- Kotlin
- Dart
public fun CamoForm(
state: CamoFormState,
modifier: Modifier = Modifier,
validateMode: ValidateMode = ValidateMode.Disabled,
onChanged: (() -> Unit)? = null,
revealField: (suspend (key: String) -> Unit)? = null,
content: @Composable () -> Unit,
)
| Name | Type | Default |
|---|---|---|
state | CamoFormState | required |
modifier | Modifier | Modifier |
validateMode | ValidateMode | ValidateMode.Disabled |
onChanged | (() -> Unit)? | null |
revealField | (suspend (key: String) -> Unit)? | null |
content | @Composable () -> Unit | required |
Design notes
Why CamoForm works this way, its states and its edge cases: contributor docs.