todoListNode function
Implementation
Node todoListNode({
required bool checked,
String? text,
Delta? delta,
String? textDirection,
Attributes? attributes,
Iterable<Node>? children,
}) {
return Node(
type: TodoListBlockKeys.type,
attributes: {
TodoListBlockKeys.checked: checked,
TodoListBlockKeys.delta:
(delta ?? (Delta()..insert(text ?? ''))).toJson(),
if (attributes != null) ...attributes,
if (textDirection != null) TodoListBlockKeys.textDirection: textDirection,
},
children: children ?? [],
);
}