Unverified Commit 2adbc2b8 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Fix chips constructor docs for callbacks (#143361)

fixes [ActionChip constructor documentation does not match class documentation](https://github.com/flutter/flutter/issues/137964)
parent 8eea4f17
......@@ -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].
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment