Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Checkbox unresponsive in custom Theme example in editor example app #543

Merged
18 changes: 14 additions & 4 deletions example/lib/pages/customize_theme_for_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,20 @@ class _CustomizeThemeForEditorState extends State<CustomizeThemeForEditor> {
configuration: configuration,
iconBuilder: (context, node) {
final checked = node.attributes[TodoListBlockKeys.checked] as bool;
return Icon(
checked ? Icons.check_box : Icons.check_box_outline_blank,
size: 20,
color: Colors.white,
return InkWell(
johansutrisno marked this conversation as resolved.
Show resolved Hide resolved
onTap: () async {
final state = await editorState;
final transaction = state.transaction
..updateNode(node, {
TodoListBlockKeys.checked: !checked,
});
state.apply(transaction);
johansutrisno marked this conversation as resolved.
Show resolved Hide resolved
},
child: Icon(
checked ? Icons.check_box : Icons.check_box_outline_blank,
size: 20,
color: Colors.white,
),
);
},
),
Expand Down
Loading