findDocumentSelection static method
Returns the current DocumentSelection for 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 DocumentSelection? findDocumentSelection([Finder? finder]) {
  final element = (finder ?? find.byType(SuperEditor)).evaluate().single as StatefulElement;
  final superEditor = element.state as SuperEditorState;
  return superEditor.editContext.composer.selection;
}