SuperEditorRobot extension

Extensions on WidgetTester for interacting with a SuperEditor the way a user would.

on

Methods

doubleTapInParagraph(String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) Future<void>
Simulates a double tap at the given offset within the paragraph with the given nodeId.
dragSelectDocumentFromPositionByOffset({required DocumentPosition from, required Offset delta, Finder? superEditorFinder}) Future<void>
Simulates a user drag that begins at the from DocumentPosition and drags a delta amount from that point.
endDocumentDragGesture(TestGesture gesture) Future<void>
Ends a drag gesture that's simulated with the given gesture.
placeCaretInParagraph(String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) Future<void>
Place the caret at the given offset in a paragraph with the given nodeId, by simulating a user gesture.
startDocumentDragFromPosition({required DocumentPosition from, Alignment startAlignmentWithinPosition = Alignment.center, Finder? superEditorFinder, PointerDeviceKind deviceKind = PointerDeviceKind.mouse}) Future<TestGesture>
Simulates a user drag that begins at the from DocumentPosition and returns the simulated gesture for further control.
startFloatingCursorGesture() Future<void>
Simulates the user holding the spacebar and starting the floating cursor gesture.
stopFloatingCursorGesture() Future<void>
Simulates the user releasing the spacebar and stopping the floating cursor gesture.
tapAtDocumentPosition(DocumentPosition position, [Finder? superEditorFinder]) Future<void>
Taps at the center of the content at the given position within a SuperEditor.
tapInParagraph(String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) Future<void>
Simulates a tap at the given offset within the paragraph with the given nodeId.
tripleTapInParagraph(String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) Future<void>
Simulates a triple tap at the given offset within the paragraph with the given nodeId.
typeImeText(String text, [Finder? imeOwnerFinder]) Future<void>
Types the given text into a SuperEditor by simulating IME text deltas from the platform.
updateFloatingCursorGesture(Offset offset) Future<void>
Simulates the user swiping the spacebar by offset.