Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8c46968c
Unverified
Commit
8c46968c
authored
May 10, 2022
by
Kyosuke Takayama
Committed by
GitHub
May 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compile error in the example code (#103261)
parent
aed6b6fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
checkbox_list_tile.dart
packages/flutter/lib/src/material/checkbox_list_tile.dart
+6
-2
No files found.
packages/flutter/lib/src/material/checkbox_list_tile.dart
View file @
8c46968c
...
...
@@ -11,6 +11,7 @@ import 'theme.dart';
import
'theme_data.dart'
;
// Examples can assume:
// bool? _throwShotAway = false;
// void setState(VoidCallback fn) { }
/// A [ListTile] with a [Checkbox]. In other words, a checkbox with a label.
...
...
@@ -163,6 +164,8 @@ class CheckboxListTile extends StatelessWidget {
///
/// If null, the checkbox will be displayed as disabled.
///
/// {@tool snippet}
///
/// The callback provided to [onChanged] should update the state of the parent
/// [StatefulWidget] using the [State.setState] method, so that the parent
/// gets rebuilt; for example:
...
...
@@ -170,14 +173,15 @@ class CheckboxListTile extends StatelessWidget {
/// ```dart
/// CheckboxListTile(
/// value: _throwShotAway,
/// onChanged: (bool newValue) {
/// onChanged: (bool
?
newValue) {
/// setState(() {
/// _throwShotAway = newValue;
/// });
/// },
/// title: Text('Throw away your shot'),
/// title:
const
Text('Throw away your shot'),
/// )
/// ```
/// {@end-tool}
final
ValueChanged
<
bool
?>?
onChanged
;
/// The color to use when this checkbox is checked.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment