mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
Fix chips constructor docs for callbacks (#143361)
fixes [ActionChip constructor documentation does not match class documentation](https://github.com/flutter/flutter/issues/137964)
This commit is contained in:
parent
8eea4f175f
commit
2adbc2b8ce
|
@ -81,9 +81,10 @@ enum _ChipVariant { flat, elevated }
|
|||
class ActionChip extends StatelessWidget implements ChipAttributes, TappableChipAttributes, DisabledChipAttributes {
|
||||
/// Create a chip that acts like a button.
|
||||
///
|
||||
/// The [label], [onPressed], [autofocus], and [clipBehavior] arguments must
|
||||
/// not be null. The [pressElevation] and [elevation] must be null or
|
||||
/// non-negative. Typically, [pressElevation] is greater than [elevation].
|
||||
/// The [label], [autofocus], and [clipBehavior] arguments must not be null.
|
||||
/// When [onPressed] is null, the [ActionChip] will be disabled. The [pressElevation]
|
||||
/// and [elevation] must be null or non-negative. Typically, [pressElevation]
|
||||
/// is greater than [elevation].
|
||||
const ActionChip({
|
||||
super.key,
|
||||
this.avatar,
|
||||
|
@ -114,9 +115,10 @@ class ActionChip extends StatelessWidget implements ChipAttributes, TappableChip
|
|||
|
||||
/// Create an elevated chip that acts like a button.
|
||||
///
|
||||
/// The [label], [onPressed], [autofocus], and [clipBehavior] arguments must
|
||||
/// not be null. The [pressElevation] and [elevation] must be null or
|
||||
/// non-negative. Typically, [pressElevation] is greater than [elevation].
|
||||
/// The [label], [autofocus], and [clipBehavior] arguments must not be null.
|
||||
/// When [onPressed] is null, the [ActionChip] will be disabled. The [pressElevation]
|
||||
/// and [elevation] must be null or non-negative. Typically, [pressElevation]
|
||||
/// is greater than [elevation].
|
||||
const ActionChip.elevated({
|
||||
super.key,
|
||||
this.avatar,
|
||||
|
|
|
@ -59,8 +59,9 @@ class ChoiceChip extends StatelessWidget
|
|||
/// Create a chip that acts like a radio button.
|
||||
///
|
||||
/// The [label], [selected], [autofocus], and [clipBehavior] arguments must
|
||||
/// not be null. The [pressElevation] and [elevation] must be null or
|
||||
/// non-negative. Typically, [pressElevation] is greater than [elevation].
|
||||
/// not be null. When [onSelected] is null, the [ChoiceChip] will be disabled.
|
||||
/// The [pressElevation] and [elevation] must be null or non-negative. Typically,
|
||||
/// [pressElevation] is greater than [elevation].
|
||||
const ChoiceChip({
|
||||
super.key,
|
||||
this.avatar,
|
||||
|
@ -98,8 +99,9 @@ class ChoiceChip extends StatelessWidget
|
|||
/// Create an elevated chip that acts like a radio button.
|
||||
///
|
||||
/// The [label], [selected], [autofocus], and [clipBehavior] arguments must
|
||||
/// not be null. The [pressElevation] and [elevation] must be null or
|
||||
/// non-negative. Typically, [pressElevation] is greater than [elevation].
|
||||
/// not be null. When [onSelected] is null, the [ChoiceChip] will be disabled.
|
||||
/// The [pressElevation] and [elevation] must be null or non-negative. Typically,
|
||||
/// [pressElevation] is greater than [elevation].
|
||||
const ChoiceChip.elevated({
|
||||
super.key,
|
||||
this.avatar,
|
||||
|
|
|
@ -64,8 +64,9 @@ class FilterChip extends StatelessWidget
|
|||
/// Create a chip that acts like a checkbox.
|
||||
///
|
||||
/// The [selected], [label], [autofocus], and [clipBehavior] arguments must
|
||||
/// not be null. The [pressElevation] and [elevation] must be null or
|
||||
/// non-negative. Typically, [pressElevation] is greater than [elevation].
|
||||
/// not be null. When [onSelected] is null, the [FilterChip] will be disabled.
|
||||
/// The [pressElevation] and [elevation] must be null or non-negative. Typically,
|
||||
/// [pressElevation] is greater than [elevation].
|
||||
const FilterChip({
|
||||
super.key,
|
||||
this.avatar,
|
||||
|
@ -107,8 +108,9 @@ class FilterChip extends StatelessWidget
|
|||
/// Create an elevated chip that acts like a checkbox.
|
||||
///
|
||||
/// The [selected], [label], [autofocus], and [clipBehavior] arguments must
|
||||
/// not be null. The [pressElevation] and [elevation] must be null or
|
||||
/// non-negative. Typically, [pressElevation] is greater than [elevation].
|
||||
/// not be null. When [onSelected] is null, the [FilterChip] will be disabled.
|
||||
/// The [pressElevation] and [elevation] must be null or non-negative. Typically,
|
||||
/// [pressElevation] is greater than [elevation].
|
||||
const FilterChip.elevated({
|
||||
super.key,
|
||||
this.avatar,
|
||||
|
|
|
@ -81,7 +81,8 @@ class InputChip extends StatelessWidget
|
|||
/// Creates an [InputChip].
|
||||
///
|
||||
/// The [onPressed] and [onSelected] callbacks must not both be specified at
|
||||
/// the same time.
|
||||
/// the same time. When both [onPressed] and [onSelected] are null, the chip
|
||||
/// will be disabled.
|
||||
///
|
||||
/// The [pressElevation] and [elevation] must be null or non-negative.
|
||||
/// Typically, [pressElevation] is greater than [elevation].
|
||||
|
|
Loading…
Reference in a new issue