findParagraphIndent static method
Finds the paragraph with the given nodeId
and returns its indent level.
Indent levels start at zero and increment by 1
for each level.
By default, this method expects a single SuperEditor in the widget tree and
finds it byType
. To specify one SuperEditor among many, pass a superEditorFinder
.
Implementation
static int findParagraphIndent(String nodeId, [Finder? superEditorFinder]) {
final component = SuperEditorInspector.findWidgetForComponent(nodeId) as ParagraphComponent;
return component.viewModel.indent;
}