diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart index ca321bac12..35b901c4c2 100644 --- a/packages/flutter/lib/src/material/chip.dart +++ b/packages/flutter/lib/src/material/chip.dart @@ -1285,8 +1285,8 @@ class RawChip extends StatefulWidget /// The [onPressed] and [onSelected] callbacks must not both be specified at /// the same time. /// - /// The [label], [isEnabled], and [clipBehavior] arguments must not be null. - /// The [pressElevation] and [elevation] must be null or non-negative. + /// The [label], [isEnabled], [selected], and [clipBehavior] arguments must + /// not be null. The [pressElevation] and [elevation] must be null or non-negative. /// Typically, [pressElevation] is greater than [elevation]. const RawChip({ Key key, @@ -1303,7 +1303,7 @@ class RawChip extends StatefulWidget this.onSelected, this.pressElevation, this.tapEnabled = true, - this.selected, + this.selected = false, this.showCheckmark = true, this.isEnabled = true, this.disabledColor, @@ -1319,6 +1319,7 @@ class RawChip extends StatefulWidget this.avatarBorder = const CircleBorder(), }) : assert(label != null), assert(isEnabled != null), + assert(selected != null), assert(clipBehavior != null), assert(pressElevation == null || pressElevation >= 0.0), assert(elevation == null || elevation >= 0.0), @@ -1430,7 +1431,7 @@ class _RawChipState extends State with TickerProviderStateMixin with TickerProviderStateMixin with TickerProviderStateMixin(effectiveLabelStyle?.color, _states); @@ -1665,7 +1665,7 @@ class _RawChipState extends State with TickerProviderStateMixin