findComposer static method
Returns the DocumentComposer within the SuperEditor matched by finder
,
or the singular SuperEditor in the widget tree, if finder
is null
.
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 DocumentComposer? findComposer([Finder? finder]) {
final element = (finder ?? find.byType(SuperEditor)).evaluate().single as StatefulElement;
final superEditor = element.state as SuperEditorState;
return superEditor.editContext.composer;
}