buildFNodeWidget function

Widget buildFNodeWidget(
  1. FNode node,
  2. FluentDocument document, {
  3. int anchorOffset = -1,
  4. int focusOffset = -1,
})

Implementation

Widget buildFNodeWidget(FNode node, FluentDocument document,
    {int anchorOffset = -1, int focusOffset = -1}) {
  final definition = document.registry.nodeFor(node);
  if (definition != null) {
    return definition.buildWidget(node, document, anchorOffset, focusOffset);
  }
  throw Exception('Node type not supported: ${node.runtimeType}');
}