Skip to content

Commit

Permalink
Modify: checkbosListTile bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan730 committed Jan 13, 2019
1 parent f4aac49 commit 5d88d0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/widgets/elements/Form/CheckBox/CheckboxListTile/demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ class CheckboxListTileDefault extends StatelessWidget {
return CheckboxListTile(
title: Text('一个简单的例子'),
activeColor: Colors.red,
value: widget.valBool,
value: widget.valBool['val'],
onChanged: (bool value) {
parant.setState(()=> widget.valBool = value);
parant.setState(()=> widget.valBool['val'] = value);
},
secondary: const Icon(Icons.hourglass_empty),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ const String _CheckboxListTileText2 =
"""### **进阶用法**
> CheckboxListTile 单选和全选的示例
""";
var valBool = true;

class Demo extends StatefulWidget {
static const String routeName = '/element/Form/Checkbox/CheckboxListTile';
final Map<String,bool> valBool = {'val':true};
@override
_DemoState createState() => _DemoState();
}
Expand Down

0 comments on commit 5d88d0c

Please sign in to comment.