diff --git a/packages/flutter/lib/src/material/checkbox.dart b/packages/flutter/lib/src/material/checkbox.dart index b54b46e33c..ddcd1a8fbb 100644 --- a/packages/flutter/lib/src/material/checkbox.dart +++ b/packages/flutter/lib/src/material/checkbox.dart @@ -138,9 +138,9 @@ class Checkbox extends StatefulWidget { /// ```dart /// Checkbox( /// value: _throwShotAway, - /// onChanged: (bool newValue) { + /// onChanged: (bool? newValue) { /// setState(() { - /// _throwShotAway = newValue; + /// _throwShotAway = newValue!; /// }); /// }, /// )