flutter_auto_gui




Methods



Keyboard


Suported Keys




write(text, interval, omitInvalid)

Types the characters in the string
(windows)

Arguments Type Description Required Default
text string String to type yes
interval duration interval between key presses no Duration(miliseconds: 50)
omitInvalid bool true to omit unsupported characters found in text,else an error is thrown for unsupported keys no false

keyUp(key)

Sets a single key to the up position
(windows)

Arguments Type Description Required Default
key string String representation of the key yes

keyDown(key)

Sets a single key to the down position
(windows)

Arguments Type Description Required Default
key string String representation of the key yes

press(key, times, interval)

Sets a key down then up to simulate a key press
(windows)

Arguments Type Description Required Default
key string String representation of the key yes
times int the amount of times to press the key no 1
interval duration Delay between each key press no Duration(miliseconds: 50)

hotkey(keys, interval)

Sets the keys to down state in order and releases then in reverse order
(windows)

Arguments Type Description Required Default
keys list ‹string› list of keys to press yes
interval duration Delay between each key press no Duration(miliseconds: 50)

Mouse


position()

Returns the current mouse position as pointint
(windows)

Return Type pointint

moveTo(point, duration, curve)

Moves the mouse cursor to the xy co-ordinate
(windows)

Arguments Type Description Required Default
point pointint x,y co-ordinate to move the mouse cursor to yes
duration duration the amount of time it takes to move the mouse cursor. If duration is zero mouse cursor is moved instantaneously. no Duration(miliseconds: 0)
curve curve the curve function used if the duration is not zero no Curves.linear

moveToRel(offset, duration, curve)

Moves the mouse cursor relative to it's current position.
(windows)

Arguments Type Description Required Default
offset size How far left (for negative values of size.width) or right (for positive values of size.width) / up (for positive values of size.height) or down (for negative values of size.height) to move the mouse cursor by yes
duration duration the amount of time it takes to move the mouse cursor. If duration is zero mouse cursor is moved instantaneously. no Duration(miliseconds: 0)
curve curve the curve function used if the duration is not zero no Curves.linear

dragTo(point, button, duration, curve)

Presses mouse button then moves the cursor to the xy co-ordinate then release mouse button
(windows)

Arguments Type Description Required Default
point pointint x,y co-ordinate to move the mouse cursor to yes
button MouseButton the mouse button to press down while moving yes
duration duration the amount of time it takes to move the mouse cursor. If duration is zero mouse cursor is moved instantaneously. no Duration(miliseconds: 0)
curve curve the curve function used if the duration is not zero no Curves.linear

dragToRel(offset, button, duration, curve)

Pressed mouse button then moves the mouse cursor relative to it's current position then release mouse button.
(windows)

Arguments Type Description Required Default
offset size How far left (for negative values of size.width) or right (for positive values of size.width) / up (for positive values of size.height) or down (for negative values of size.height) to move the mouse cursor by yes
button MouseButton the mouse button to press down while moving yes
duration duration the amount of time it takes to move the mouse cursor. If duration is zero mouse cursor is moved instantaneously. no Duration(miliseconds: 0)
curve curve the curve function used if the duration is not zero no Curves.linear

mouseDown(button)

Performs pressing a mouse button down (but not up afterwards) at the current mouse position
(windows)

Arguments Type Description Required Default
button MouseButton the mouse button to press no MouseButton.left

mouseUp(button)

Performs releasing a mouse button up (but not down beforehand) at the current mouse position
(windows)

Arguments Type Description Required Default
button MouseButton the mouse button to release no MouseButton.left

click(button, clicks, interval)

Performs pressing a mouse button down and then releasing immediately it
(windows)

Arguments Type Description Required Default
button MouseButton the mouse button to click no MouseButton.left
clicks int the amount of times to press the key no 1
interval duration interval between key presses no Duration(miliseconds: 0)

scroll(clicks, axis)

Performs a scroll of the mouse forwards or backwards in horizontal or vertical direction
(windows)

Arguments Type Description Required Default
clicks int How much to scroll the mouse by positive (forwards / right), negative (backwards / left) yes
axis axis Direction to scroll no axis.vertical