numberedListNode function

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

Implementation

Node numberedListNode({
  Delta? delta,
  Attributes? attributes,
  int? number,
  String? textDirection,
  Iterable<Node>? children,
}) {
  attributes ??= {
    'delta': (delta ?? Delta()).toJson(),
    NumberedListBlockKeys.number: number,
  };
  return Node(
    type: NumberedListBlockKeys.type,
    attributes: {
      ...attributes,
      if (textDirection != null)
        NumberedListBlockKeys.textDirection: textDirection,
    },
    children: children ?? [],
  );
}