bulletedListNode function

Node bulletedListNode({
  1. String? text,
  2. Delta? delta,
  3. String? textDirection,
  4. Attributes? attributes,
  5. Iterable<Node>? children,
})

Implementation

Node bulletedListNode({
  String? text,
  Delta? delta,
  String? textDirection,
  Attributes? attributes,
  Iterable<Node>? children,
}) {
  return Node(
    type: BulletedListBlockKeys.type,
    attributes: {
      BulletedListBlockKeys.delta:
          (delta ?? (Delta()..insert(text ?? ''))).toJson(),
      if (attributes != null) ...attributes,
      if (textDirection != null)
        BulletedListBlockKeys.textDirection: textDirection,
    },
    children: children ?? [],
  );
}