├── .gitignore
├── .gradle
├── 6.1.1
│ ├── executionHistory
│ │ └── executionHistory.lock
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileHashes
│ │ └── fileHashes.lock
│ └── gc.properties
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ └── cache.properties
├── checksums
│ └── checksums.lock
└── vcs-1
│ └── gc.properties
├── .metadata
├── LICENSE
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── automation
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── backend
├── Commands
│ ├── ClickMouse.py
│ ├── Command.py
│ ├── CommandsParser.py
│ ├── EnterText.py
│ ├── HotKey.py
│ ├── MoveMouseAbsolute.py
│ ├── OpenTerminal.py
│ ├── PressKey.py
│ ├── RepeatCommands.py
│ ├── Routine.py
│ └── Sleep.py
└── main.py
├── commands_gui.png
├── commands_json.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── CommandsPalette.dart
├── Infromation.dart
├── InspectJson.dart
├── Settings.dart
├── Styles.dart
├── commands
│ ├── Command.dart
│ ├── CommandTile.dart
│ ├── EnterTextCommand.dart
│ ├── HotKeyCommand.dart
│ ├── MouseClick.dart
│ ├── MoveMouseAbsolute.dart
│ ├── PressKey.dart
│ ├── RepeatCommands.dart
│ └── SleepCommand.dart
└── main.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── local.properties
├── pubspec.lock
├── pubspec.yaml
├── release
└── linux
│ ├── automation
│ ├── backend
│ ├── Commands
│ │ ├── ClickMouse.py
│ │ ├── Command.py
│ │ ├── CommandsParser.py
│ │ ├── EnterText.py
│ │ ├── HotKey.py
│ │ ├── MoveMouseAbsolute.py
│ │ ├── OpenTerminal.py
│ │ ├── PressKey.py
│ │ ├── RepeatCommands.py
│ │ ├── Routine.py
│ │ └── Sleep.py
│ └── main.py
│ ├── data
│ ├── flutter_assets
│ │ ├── AssetManifest.json
│ │ ├── FontManifest.json
│ │ ├── NOTICES
│ │ ├── fonts
│ │ │ └── MaterialIcons-Regular.otf
│ │ ├── packages
│ │ │ └── cupertino_icons
│ │ │ │ └── assets
│ │ │ │ └── CupertinoIcons.ttf
│ │ └── version.json
│ └── icudtl.dat
│ └── lib
│ ├── libapp.so
│ └── libflutter_linux_gtk.so
├── settings.hive
├── settings.lock
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
--------------------------------------------------------------------------------
/.gradle/6.1.1/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/.gradle/6.1.1/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/.gradle/6.1.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/6.1.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/.gradle/6.1.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/6.1.1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/.gradle/6.1.1/gc.properties
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Thu Apr 01 23:28:39 CEST 2021
2 | gradle.version=6.1.1
3 |
--------------------------------------------------------------------------------
/.gradle/checksums/checksums.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/.gradle/checksums/checksums.lock
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GUI_AUTOMATION
2 | gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required.
3 |
4 |
5 | # Install python dependencies
6 |
7 | ```
8 | pip install pyautogui
9 | ```
10 |
11 | that's it, now you can try the app by running the executable file ```release/linux/automation```. Check the example down below.
12 | # Example
13 |
14 | It is tested on Linux based system Ubuntu 20.4
15 | the following sequence will open a terminal write "python --version" in it then press Enter. The process will be repeated 2 times (overall 3 times).
16 |
17 | 
18 |
19 |
20 | 
21 |
22 |
23 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 29
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.automation"
42 | minSdkVersion 16
43 | targetSdkVersion 29
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | }
64 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/automation/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.automation
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/backend/Commands/ClickMouse.py:
--------------------------------------------------------------------------------
1 | from Commands.Command import Command, auto
2 |
3 |
4 | class LeftClick(Command):
5 | type = "left_click"
6 |
7 | def __init__(self):
8 | super().__init__('{"type" : "left_click"}')
9 |
10 | def execute(self, commands, commands_counter):
11 | auto.leftClick()
12 |
13 | def is_valid(self):
14 | return True
15 |
16 | def print(self):
17 | return ""
18 |
19 |
20 | class RightClick(Command):
21 | type = "right_click"
22 |
23 | def __init__(self):
24 | super().__init__('{"type" : "right_click"}')
25 |
26 | def execute(self, commands, commands_counter):
27 | auto.rightClick()
28 |
29 | def is_valid(self):
30 | return True
31 |
--------------------------------------------------------------------------------
/backend/Commands/Command.py:
--------------------------------------------------------------------------------
1 | import pyautogui as auto
2 |
3 |
4 | class Command:
5 | def __init__(self, json):
6 | self.json = json
7 |
8 | def execute(self, commands, counter):
9 | pass
10 |
11 | def print(self):
12 | return self.json
13 |
14 | def is_valid(self):
15 | pass
16 |
--------------------------------------------------------------------------------
/backend/Commands/CommandsParser.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | import os
3 | import sys
4 | import inspect
5 |
6 |
7 | def parse(data):
8 | # blank dictionary of all possible command references
9 | command_references = {}
10 | # list of all commands to run
11 | command_list = []
12 |
13 |
14 | path = os.path.dirname(os.path.realpath(__file__))
15 | files = os.listdir(path)
16 | # get list of all .py files in directory except this script
17 | command_filenames = [x for x in files if x.endswith('.py') and x != os.path.basename(__file__)]
18 | # bring the Command.py to the front of the list to be loaded in first
19 | command_filenames.insert(0, command_filenames.pop(command_filenames.index('Command.py')))
20 |
21 | for cmd_file in command_filenames:
22 | # get rid of extension
23 | command_name = os.path.splitext(cmd_file)[0]
24 |
25 | # load module Commands.'classname'
26 | module = importlib.import_module('Commands.{0}'.format(command_name))
27 |
28 | # iterate over attributes of each module and add classes only
29 | for attribute_name in dir(module):
30 | attribute = getattr(module, attribute_name)
31 | if inspect.isclass(attribute):
32 | try:
33 | # try to get its type, in order to add it to the dictionary for instant access
34 | command_type = getattr(attribute, 'type')
35 | command_references[command_type] = attribute
36 | except AttributeError:
37 | # class has no type, ignore it, since Command class has no type.
38 | pass
39 |
40 | # iterate through list of commands given from main
41 | for command in data:
42 | try:
43 | command_type = command["type"]
44 | except KeyError:
45 | print("Backend: Error: command type is not found in json item:\n ", command)
46 | sys.exit(1)
47 |
48 | # search through list of commands to instantiate object
49 | try:
50 | print('command data {}'.format(command))
51 | constructor = command_references[command_type]
52 | command_list.append(constructor(command))
53 | except KeyError:
54 | print(
55 | f"Backend : Error: command type '{command_type}' has no implementation yet. perhaps there's a typo in "
56 | f"type name")
57 | pass
58 |
59 | return command_list
60 |
--------------------------------------------------------------------------------
/backend/Commands/EnterText.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class EnterText(Command):
7 | type = "enter_text"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 |
12 | try:
13 | self.text = json["text"]
14 | self.delay = json["delay"]
15 | self.press_enter = json["press_enter"]
16 | self.start_delay = json["start_delay"]
17 | except KeyError:
18 | print("Backend: Error: some parameters are not found in:\n ", json)
19 | sys.exit(1)
20 |
21 | def execute(self, commands, commands_counter):
22 | auto.sleep(1 + self.start_delay/1000)
23 | auto.write(self.text, interval=self.delay/1000)
24 | if self.press_enter:
25 | auto.hotkey('enter')
26 |
27 | def is_valid(self):
28 | return isinstance(self.text, str) and isinstance(self.delay, int) and isinstance(self.start_delay, int) and type(self.press_enter) == bool
29 |
30 |
--------------------------------------------------------------------------------
/backend/Commands/HotKey.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class HotKey(Command):
7 | type = "hot_key"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | self.keys = ()
12 | array = []
13 | try:
14 | for key in json["keys"]:
15 | array.append(key)
16 | self.keys = tuple(array)
17 | except KeyError:
18 | print("Backend: Error: 'keys' parameter is not found in:\n ", json)
19 | sys.exit(1)
20 |
21 | def execute(self, commands, commands_counter):
22 | auto.hotkey(*self.keys)
23 |
24 | def is_valid(self):
25 | for key in self.keys:
26 | if not isinstance(key, str):
27 | return False
28 | return True
29 |
30 |
--------------------------------------------------------------------------------
/backend/Commands/MoveMouseAbsolute.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class MoveMouseAbsolute(Command):
7 | type = "move_mouse_absolute"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | try:
12 | self.x = json["x"]
13 | self.y = json["y"]
14 | except KeyError:
15 | print("Backend: Error: either 'x' or 'y' is not found in:\n ", json)
16 | sys.exit(1)
17 |
18 | def execute(self, commands, commands_counter):
19 | assert(self.x != -1 and self.y != -1)
20 | auto.moveTo(self.x, self.y)
21 |
22 | def is_valid(self):
23 | return isinstance(self.x, int) and isinstance(self.y, int)
24 |
25 |
--------------------------------------------------------------------------------
/backend/Commands/OpenTerminal.py:
--------------------------------------------------------------------------------
1 | from Commands.Command import Command, auto
2 |
3 |
4 | class OpenTerminal(Command):
5 | type = "open_terminal"
6 |
7 | def __init__(self):
8 | super.__init__('{"type" : "open_terminal"}')
9 |
10 | def execute(self, commands, commands_counter):
11 | auto.hotkey('altright', 'ctrlright', 't')
12 |
13 | def is_valid(self):
14 | return True
15 |
--------------------------------------------------------------------------------
/backend/Commands/PressKey.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class PressKey(Command):
7 | type = "press_key"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | try:
12 | self.key = json["key"]
13 | except KeyError:
14 | print("Backend: Error: 'key' parameter is not found in:\n ", json)
15 | sys.exit(1)
16 |
17 | def execute(self, commands, commands_counter):
18 | assert(self.key != "")
19 | auto.press(self.key)
20 |
21 | def is_valid(self):
22 | return isinstance(self.key, str) and self.key != ""
23 |
--------------------------------------------------------------------------------
/backend/Commands/RepeatCommands.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class RepeatCommands(Command):
7 | type = "repeat_commands"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | try:
12 | self.times = json["times"]
13 | self.side = json["side"]
14 | except KeyError:
15 | print("Backend: Error: some parameters are not found in:\n ", json)
16 | sys.exit(1)
17 |
18 | def execute(self, commands, curr_index):
19 | for x in range(0, self.times):
20 | counter = -1
21 | if self.side == "all_above":
22 | counter = 0
23 | else:
24 | counter = curr_index + 1
25 |
26 | if counter >= len(commands) or counter < 0:
27 | pass
28 |
29 | while counter < len(commands):
30 | if counter == curr_index:
31 | break
32 | commands[counter].execute(commands, counter)
33 | counter += 1
34 |
35 | def is_valid(self):
36 | return (self.side == "all_above" or self.side == "all_below") and isinstance(self.times, int) and self.times > 0
37 |
38 |
--------------------------------------------------------------------------------
/backend/Commands/Routine.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import json
3 | from Commands.Command import Command
4 | from Commands import CommandsParser as parser
5 |
6 |
7 | class Routine(Command):
8 | type = "routine"
9 |
10 | def __init__(self, json_file):
11 | super().__init__(json_file)
12 |
13 | try:
14 | self.commands = json_file["commands"]
15 | self.commands = json_file.loads(self.commands)
16 | except KeyError:
17 | try:
18 | self.file = json_file["file"]
19 | with open(self.file) as json_file:
20 | if json_file is None:
21 | print("cannot find provided json file.")
22 | sys.exit(1)
23 | self.commands = json.load(json_file)
24 | except KeyError:
25 | print("Backend: Error: the routine's commands are missing, please provide them "
26 | "through commands or file argument. "
27 | "in:\n ", json_file)
28 | sys.exit(1)
29 | self.routine_commands = parser.parse(self.commands)
30 |
31 | def execute(self, commands, commands_counter):
32 | for command in self.routine_commands:
33 | command.execute(commands, commands_counter)
34 |
35 | def is_valid(self):
36 | all_valid = True
37 | for command in self.routine_commands:
38 | if not command.is_valid():
39 | all_valid = False
40 | print("the following sub-command is not valid: ", command.print())
41 | return all_valid
42 |
--------------------------------------------------------------------------------
/backend/Commands/Sleep.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from datetime import time
3 |
4 | from Commands.Command import Command, auto
5 |
6 |
7 | class Sleep(Command):
8 | type = "sleep"
9 |
10 | def __init__(self, json):
11 | super().__init__(json)
12 | try:
13 | self.duration = json["duration"]
14 | except KeyError:
15 | print("Backend: Error: duration parameter is not found in:\n ", json)
16 | sys.exit(1)
17 |
18 | def execute(self, commands, commands_counter):
19 | auto.sleep(self.duration)
20 |
21 | def is_valid(self):
22 | return isinstance(self.duration, float)
23 |
--------------------------------------------------------------------------------
/backend/main.py:
--------------------------------------------------------------------------------
1 | import json
2 | from Commands.CommandsParser import parse
3 | import argparse
4 | import sys
5 |
6 | if __name__ == '__main__':
7 | parser = argparse.ArgumentParser()
8 | parser.add_argument("--file", help='enter the json commands file')
9 | parser.add_argument("--commands", help="enter json commands as string")
10 | args = parser.parse_args()
11 |
12 | # load commands either from commands argument or from a provided json file.
13 | if args.commands is not None:
14 | commands = json.loads(args.commands)
15 | else:
16 | with open(args.file) as json_file:
17 | if json_file is None:
18 | print("cannot find provided json file.")
19 | sys.exit(1)
20 | commands = json.load(json_file)
21 |
22 | print("Backend: received commands: ", commands, "\n\n")
23 |
24 | # sub routines will be parsed also.
25 | commands = parse(commands)
26 |
27 | # validate commands before any execution, this may reduce runtime unexpected behavior.
28 | valid = True
29 | for command in commands:
30 | if not command.is_valid():
31 | valid = False
32 | print("the following command is not valid: ", command.print())
33 |
34 | # exit only if at least one command is not valid and after checking all commands and gave
35 | # feedback to user
36 | if not valid:
37 | sys.exit(0)
38 |
39 | # pass commands_counter (similar to program counter, pc), and the list of commands to every
40 | # execution, this will help the repeat command to repeat a chunk of the commands list.
41 | commands_counter = 0
42 | for command in commands:
43 | command.execute(commands, commands_counter)
44 | commands_counter += 1
45 |
46 | sys.exit(0)
47 | # TODO: defensive programming, implement record feature. make requirements file to install through pip
48 |
--------------------------------------------------------------------------------
/commands_gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/commands_gui.png
--------------------------------------------------------------------------------
/commands_json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/commands_json.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.automation;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.automation;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.automation;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | automation
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/CommandsPalette.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/CommandTile.dart';
2 | import 'package:automation/commands/EnterTextCommand.dart';
3 | import 'package:automation/commands/HotKeyCommand.dart';
4 | import 'package:automation/commands/MouseClick.dart';
5 | import 'package:automation/commands/MoveMouseAbsolute.dart';
6 | import 'package:automation/commands/PressKey.dart';
7 | import 'package:automation/commands/RepeatCommands.dart';
8 | import 'package:automation/commands/SleepCommand.dart';
9 | import 'package:flutter/material.dart';
10 | import 'package:flutter/widgets.dart';
11 |
12 | class CommandsPalette extends StatefulWidget {
13 | final void Function(CommandTile) onPick;
14 | final Function(int)? onSelect;
15 |
16 | CommandsPalette({Key? key, required this.onPick, this.onSelect}) : super(key: key);
17 |
18 | @override
19 | _CommandsPaletteState createState() =>
20 | _CommandsPaletteState(onPick: this.onPick, onSelect: this.onSelect);
21 | }
22 |
23 | class _CommandsPaletteState extends State {
24 | final void Function(CommandTile)? onPick;
25 | late List _children;
26 | final List? items;
27 | final Function(int)? onSelect;
28 |
29 | _CommandsPaletteState({this.onPick, this.items, this.onSelect});
30 |
31 | void initState() {
32 | _children = [
33 | CommandIconButton(
34 | creator: MoveMouseAbsolute.createTile(onSelect: onSelect),
35 | iconData: Icons.mouse,
36 | callback: onPick,
37 | message: "Move Mouse, Absolute position",
38 | ),
39 | CommandIconButton(
40 | creator: PressKey.createTile(onSelect: onSelect),
41 | iconData: Icons.keyboard,
42 | callback: onPick,
43 | message: "Press Keyboard Key",
44 | ),
45 | CommandIconButton(
46 | creator: SleepCommand.createTile(onSelect: onSelect),
47 | iconData: Icons.watch_later,
48 | callback: onPick,
49 | message: "do nothing for amount of time",
50 | ),
51 | CommandIconButton(
52 | creator: HotKeyCommand.createTile(onSelect: onSelect),
53 | iconData: Icons.local_fire_department,
54 | callback: onPick,
55 | message: "hotkey, keys combination",
56 | ),
57 | CommandIconButton(
58 | creator: EnterTextCommand.createTile(onSelect: onSelect),
59 | iconData: Icons.text_fields,
60 | callback: onPick,
61 | message: "enter text, wherever it's focused",
62 | ),
63 | CommandIconButton(
64 | creator: RepeatCommands.createTile(onSelect: onSelect),
65 | iconData: Icons.repeat,
66 | callback: onPick,
67 | message: "repeat commands for an amount for times",
68 | ),
69 | CommandIconButton(
70 | creator: MouseClick.createTile(onSelect: onSelect),
71 | iconData: Icons.touch_app,
72 | callback: onPick,
73 | message: "click left or "
74 | "right mouse button",
75 | )
76 | ];
77 | super.initState();
78 | }
79 |
80 | @override
81 | Widget build(BuildContext context) {
82 | return GridView.count(crossAxisCount: 2, children: _children);
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/lib/Infromation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/widgets.dart';
3 |
4 | class Information extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 | return Scaffold(
8 | appBar: AppBar(
9 | title: Text("Information"),
10 | ),
11 | body: SingleChildScrollView(
12 | child: Container(
13 | padding: EdgeInsets.fromLTRB(30, 10, 30, 0),
14 | child: Column(
15 | crossAxisAlignment: CrossAxisAlignment.start,
16 | children: [
17 | Text(
18 | "Automate boring repetitive pc tasks using this tool. Create a "
19 | "list of commands and execute them using the run button.\n\n",
20 | style: TextStyle(fontSize: 25),
21 | overflow: TextOverflow.fade,
22 | ),
23 | Text(
24 | "Shortcuts:\nDelete a list-item:\n"
25 | "Click on it and press delete key in the keyboard.\n\nChange item position:\nClick "
26 | "on the "
27 | "item and hold Shift + arrowUp or arrowDown\n\nTo move item selection up and "
28 | "down:"
29 | "\nArrowUp or "
30 | "arrowDown after highlighting an item using mouse click\n\n",
31 | style: TextStyle(fontSize: 25, color: Colors.blueAccent.shade700),
32 | overflow: TextOverflow.fade,
33 | ),
34 | Card(
35 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
36 | color: Colors.yellow.shade200,
37 | child: Column(
38 | children: [
39 | SizedBox(
40 | height: 10,
41 | ),
42 | Row(
43 | children: [
44 | SizedBox(
45 | width: 20,
46 | ),
47 | Icon(
48 | Icons.warning_amber_outlined,
49 | color: Colors.red,
50 | size: 60,
51 | ),
52 | SizedBox(
53 | width: 10,
54 | ),
55 | Text(
56 | "Warning!",
57 | style: TextStyle(fontSize: 25, color: Colors.red),
58 | overflow: TextOverflow.fade,
59 | ),
60 | ],
61 | ),
62 | Container(
63 | padding: EdgeInsets.fromLTRB(20, 10, 20, 20),
64 | child: Text(
65 | "While running an automation, if something unexpected happened and you "
66 | "want to stop the automation, just move the mouse cursor to a screen "
67 | "corner, "
68 | "backend will stop the execution then.\nIf a sleep command is running you have to keep"
69 | " the mouse cursor in the corner until it finishes, only after that "
70 | "backend will read your force stop signal.",
71 | style: TextStyle(fontSize: 25),
72 | overflow: TextOverflow.fade,
73 | ),
74 | ),
75 | ],
76 | ),
77 | ),
78 | Text(
79 | "\n\nThere are some features I "
80 | "would like to "
81 | "implement "
82 | "like steps-recorder, "
83 | "save/load json commands file through an open Dialog (this is a flutter "
84 | "limitation), "
85 | "save sequence of commands as one "
86 | "command and add it to the commands palette..."
87 | ".\n\nAs a "
88 | "workaround "
89 | "to "
90 | "save and load json files I made a json inspection page, you can copy the json data"
91 | "from there and save it on your machine, you can paste your saved json file as "
92 | "well "
93 | "in order to execute it.\n\n\nHave a smart and safe automation :)\nHassan Kanso",
94 | style: TextStyle(fontSize: 25),
95 | overflow: TextOverflow.fade,
96 | ),
97 | ],
98 | )),
99 | ),
100 | );
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/lib/InspectJson.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/main.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:flutter/widgets.dart';
5 |
6 | class InspectJson extends StatelessWidget {
7 | final String? jsonString;
8 |
9 | final TextEditingController jsonTextController = new TextEditingController();
10 |
11 | static final String pythonCodePathKey = "pythonCodePath";
12 |
13 | InspectJson({this.jsonString}) {
14 | jsonTextController.text = jsonString!;
15 | }
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Scaffold(
20 | appBar: AppBar(title: Text("Json Inspection"), actions: [
21 | MaterialButton(
22 | color: Colors.blue,
23 | child: Row(
24 | children: [
25 | Icon(
26 | Icons.play_arrow,
27 | color: Colors.green,
28 | ),
29 | Text("Run"),
30 | ],
31 | ),
32 | onPressed: () {
33 | FocusScope.of(context).unfocus();
34 | MyApp.runPythonBackend(jsonTextController.text);
35 | },
36 | ),
37 | IconButton(
38 | tooltip: "Copy to Clipboard",
39 | icon: Icon(Icons.copy),
40 | onPressed: () {
41 | Clipboard.setData(new ClipboardData(text: jsonString));
42 | },
43 | )
44 | ]),
45 | body: Container(
46 | padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
47 | child: TextField(
48 | maxLines: 30,
49 | controller: jsonTextController,
50 | style: TextStyle(fontSize: 15),
51 | )),
52 | );
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/Settings.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/widgets.dart';
5 | import 'package:hive/hive.dart';
6 |
7 | class Settings extends StatelessWidget {
8 | final TextEditingController pythonPathController = new TextEditingController();
9 | Future>? hiveBoxFuture;
10 | Box? box;
11 | static final String pythonCodePathKey = "pythonCodePath";
12 | static final String defaultPythonCodePath = Directory.current.path + "/backend/main.py";
13 |
14 | Settings() {
15 | hiveBoxFuture = Hive.openBox("settings");
16 | }
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | appBar: AppBar(title: Text("Settings")),
22 | body: FutureBuilder>(
23 | future: hiveBoxFuture,
24 | builder: (BuildContext context, AsyncSnapshot snapshot) {
25 | if (snapshot.hasData) {
26 | box = snapshot.data;
27 | pythonPathController.text =
28 | box!.get(pythonCodePathKey, defaultValue: defaultPythonCodePath)!;
29 | return Column(children: [
30 | Expanded(
31 | flex: 1,
32 | child: Row(
33 | children: [
34 | Spacer(flex: 1),
35 | Expanded(flex: 4, child: Text("Python Code Path:")),
36 | Expanded(
37 | flex: 10,
38 | child: TextField(
39 | controller: pythonPathController,
40 | )),
41 | Expanded(
42 | flex: 2,
43 | child: IconButton(
44 | icon: Icon(Icons.more_horiz),
45 | tooltip: "not "
46 | "implemented yet",
47 | onPressed: null),
48 | )
49 | ],
50 | )),
51 | Spacer(flex: 3),
52 | Expanded(
53 | flex: 1,
54 | child: Row(
55 | textDirection: TextDirection.rtl,
56 | children: [
57 | SizedBox(
58 | width: 40,
59 | ),
60 | MaterialButton(
61 | color: Colors.blue,
62 | child: Text("Save"),
63 | onPressed: () {
64 | box!.put(pythonCodePathKey, pythonPathController.text);
65 | },
66 | ),
67 | SizedBox(
68 | width: 20,
69 | ),
70 | MaterialButton(
71 | color: Colors.grey,
72 | child: Text("Reset Default"),
73 | onPressed: () {
74 | pythonPathController.text = defaultPythonCodePath;
75 | box!.put(pythonCodePathKey, pythonPathController.text);
76 | },
77 | ),
78 | ],
79 | ),
80 | ),
81 | ]);
82 | } else if (snapshot.hasError) {
83 | return Center(
84 | child:
85 | Text("Something is wrong with storage, error: " + snapshot.error.toString()));
86 | }
87 | return Center(child: CircularProgressIndicator());
88 | }),
89 | );
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/lib/Styles.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 |
3 | class Styles {
4 | static double iconSize(BuildContext context) {
5 | double max = 30;
6 | double current = MediaQuery.of(context).size.width * 0.06;
7 | if (current > max) {
8 | return max;
9 | }
10 | return current;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/commands/Command.dart:
--------------------------------------------------------------------------------
1 | abstract class Command {
2 | String toJson();
3 | bool isValid();
4 | }
5 |
--------------------------------------------------------------------------------
/lib/commands/CommandTile.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/main.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class CommandTile extends StatefulWidget {
6 | int id;
7 |
8 | final void Function(int id)? onSelect;
9 | Command? command;
10 |
11 | Key? key;
12 | final Widget? child;
13 | final Color unselectedColor = Colors.white54;
14 | final Color selectedColor = Colors.lightBlueAccent.shade700;
15 |
16 | Color? _backgroundColor;
17 |
18 | void select() {
19 | _backgroundColor = selectedColor;
20 | }
21 |
22 | void unselect() {
23 | _backgroundColor = unselectedColor;
24 | }
25 |
26 | CommandTile({this.key, this.onSelect, this.child, this.id = -1}) {
27 | _backgroundColor = unselectedColor;
28 | command = child as Command?;
29 | }
30 |
31 | @override
32 | _CommandTileState createState() => _CommandTileState();
33 | }
34 |
35 | class _CommandTileState extends State {
36 | void select() {
37 | if (widget.onSelect != null) {
38 | widget.onSelect!(widget.id);
39 | }
40 | setState(() {
41 | widget._backgroundColor = widget.selectedColor;
42 | });
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return GestureDetector(
48 | onTap: () {
49 | select();
50 | },
51 | child: ValueListenableBuilder(
52 | valueListenable: MyApp.selectedItem,
53 | builder: (context, dynamic value, child) {
54 | if (value != widget.id) {
55 | widget.unselect();
56 | }
57 | return Card(
58 | color: widget._backgroundColor,
59 | key: this.widget.key,
60 | child: child,
61 | );
62 | },
63 | child: this.widget.child),
64 | );
65 | }
66 | }
67 |
68 | class CommandIconButton extends StatelessWidget {
69 | final void Function(CommandTile)? callback;
70 | final CommandTile Function()? creator;
71 | final IconData? iconData;
72 | final String? message;
73 |
74 | const CommandIconButton({Key? key, this.creator, this.iconData, this.callback, this.message})
75 | : super(key: key);
76 |
77 | @override
78 | Widget build(BuildContext context) {
79 | return Tooltip(
80 | message: this.message!,
81 | child: InkWell(
82 | onTap: () {
83 | callback!(creator!());
84 | },
85 | child: Icon(iconData)),
86 | );
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/lib/commands/EnterTextCommand.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class EnterTextCommand extends StatelessWidget with Command {
6 | final TextEditingController textController = new TextEditingController();
7 | TextEditingController delayController = new TextEditingController();
8 | TextEditingController startDelayController = new TextEditingController();
9 |
10 | EnterTextCommand() {
11 | delayController.text = 20.toString();
12 | startDelayController.text = 0.toString();
13 | }
14 |
15 | @override
16 | String toJson() {
17 | return '{"type" : "enter_text", "text" : "${this.textController.text}", "delay"'
18 | ' : '
19 | '${int.parse(delayController.text)}, "press_enter" : false, "start_delay" : ${int.parse(this.startDelayController.text)} }';
20 | }
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return Row(children: [
25 | Expanded(
26 | flex: 2,
27 | child: Row(
28 | children: [
29 | Spacer(flex: 1),
30 | Expanded(flex: 6, child: Text("Enter Text")),
31 | ],
32 | ),
33 | ),
34 | Expanded(
35 | flex: 11,
36 | child: Row(children: [
37 | Expanded(
38 | flex: 4,
39 | child: TextField(
40 | controller: startDelayController,
41 | decoration: InputDecoration(labelText: "start delay (ms)"),
42 | )),
43 | Expanded(
44 | flex: 4,
45 | child: TextField(
46 | controller: delayController,
47 | decoration: InputDecoration(labelText: "delay (ms)"),
48 | )),
49 | Spacer(flex: 1),
50 | Expanded(
51 | flex: 15,
52 | child: TextField(
53 | decoration: InputDecoration(labelText: "Text"),
54 | controller: textController,
55 | keyboardType: TextInputType.text,
56 | maxLines: 3,
57 | ),
58 | ),
59 | ]),
60 | ),
61 | Spacer(flex: 1),
62 | ]);
63 | }
64 |
65 | @override
66 | bool isValid() {
67 | return this.textController.text.isNotEmpty &&
68 | this.startDelayController.text.isNotEmpty &&
69 | this.delayController.text.isNotEmpty &&
70 | int.tryParse(this.startDelayController.text) != null &&
71 | int.tryParse(this.delayController.text) != null;
72 | }
73 |
74 | static createTile({Function(int p1)? onSelect}) {
75 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: EnterTextCommand());
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/lib/commands/HotKeyCommand.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class HotKeyCommand extends StatelessWidget with Command {
6 | _AutoExtensionListController listController = new _AutoExtensionListController();
7 |
8 | @override
9 | String toJson() {
10 | String keys = "[";
11 | if (this.listController.controllers!.isNotEmpty) {
12 | keys += '"' + this.listController.controllers!.first.text + '"';
13 | }
14 | for (int i = 1; i < this.listController.controllers!.length; i++) {
15 | String keyText = this.listController.controllers![i].text;
16 | if (keyText.isEmpty) break;
17 |
18 | keys += ", " + '"' + keyText + '"';
19 | }
20 | keys += "]";
21 |
22 | return '{"type" : "hot_key", "keys" : $keys }';
23 | }
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Row(children: [
28 | Expanded(
29 | flex: 1,
30 | child: Row(
31 | children: [
32 | Spacer(flex: 1),
33 | Expanded(
34 | flex: 6,
35 | child: Text(
36 | "HotKey (case insensitive)",
37 | overflow: TextOverflow.visible,
38 | )),
39 | ],
40 | ),
41 | ),
42 | Expanded(
43 | flex: 5,
44 | child: Container(height: 50, child: _AutoExtensionList(controller: listController))),
45 | Spacer(flex: 1),
46 | ]);
47 | }
48 |
49 | @override
50 | bool isValid() {
51 | for (int i = 0; i < this.listController.controllers!.length; i++) {
52 | if (this.listController.controllers!.isEmpty) return false;
53 | }
54 |
55 | return true;
56 | }
57 |
58 | static createTile({Function(int p1)? onSelect}) {
59 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: HotKeyCommand());
60 | }
61 | }
62 |
63 | class _AutoExtensionList extends StatefulWidget {
64 | List? controllers;
65 | final _AutoExtensionListController? controller;
66 |
67 | _AutoExtensionList({this.controller}) {
68 | if (controllers == null) {
69 | controllers = [];
70 | }
71 | controller!.controllers = controllers;
72 | }
73 |
74 | @override
75 | __AutoExtensionListState createState() => __AutoExtensionListState();
76 | }
77 |
78 | class __AutoExtensionListState extends State<_AutoExtensionList> {
79 | late List _keyItems;
80 |
81 | @override
82 | void initState() {
83 | TextEditingController tec = TextEditingController();
84 | _keyItems = [
85 | _TextField(
86 | key: Key(widget.controllers!.length.toString()),
87 | controller: tec,
88 | allControllers: widget.controllers,
89 | addItem: addItem,
90 | removeItem: removeItem,
91 | )
92 | ];
93 |
94 | widget.controllers!.add(tec);
95 |
96 | super.initState();
97 | }
98 |
99 | void removeItem() {
100 | setState(() {
101 | _keyItems.removeLast();
102 | widget.controllers!.removeLast();
103 |
104 | for (int i = _keyItems.length - 1; i >= 1; i--) {
105 | if (widget.controllers![i].text.isNotEmpty) {
106 | break;
107 | }
108 | _keyItems.removeLast();
109 | widget.controllers!.removeLast();
110 | }
111 | });
112 | }
113 |
114 | void addItem() {
115 | TextEditingController tec = new TextEditingController();
116 | setState(() {
117 | _keyItems.add(_TextField(
118 | key: Key(widget.controllers!.length.toString()),
119 | controller: tec,
120 | allControllers: widget.controllers,
121 | addItem: addItem,
122 | removeItem: removeItem,
123 | ));
124 | widget.controllers!.add(tec);
125 | });
126 | }
127 |
128 | @override
129 | Widget build(BuildContext context) {
130 | return ListView.builder(
131 | itemCount: _keyItems.length,
132 | scrollDirection: Axis.horizontal,
133 | itemBuilder: (context, index) {
134 | return _keyItems[index];
135 | });
136 | }
137 | }
138 |
139 | class _AutoExtensionListController {
140 | List? controllers;
141 | }
142 |
143 | class _TextField extends StatelessWidget {
144 | final Function()? addItem;
145 | final Function()? removeItem;
146 | final TextEditingController? controller;
147 | final List? allControllers;
148 | final Key? key;
149 |
150 | _TextField({this.key, this.controller, this.allControllers, this.addItem, this.removeItem});
151 |
152 | @override
153 | Widget build(BuildContext context) {
154 | return SizedBox(
155 | width: 100,
156 | height: 50,
157 | child: TextField(
158 | key: key,
159 | decoration: InputDecoration(labelText: "Key"),
160 | controller: controller,
161 | keyboardType: TextInputType.text,
162 | onChanged: (value) {
163 | if (allControllers!.last.text.isNotEmpty) {
164 | addItem!();
165 | } else if (allControllers!.length > 1 &&
166 | allControllers![allControllers!.length - 1].text.isEmpty &&
167 | allControllers![allControllers!.length - 2].text.isEmpty) {
168 | removeItem!();
169 | }
170 | },
171 | ),
172 | );
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/lib/commands/MouseClick.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class MouseClick extends StatefulWidget with Command {
6 | String? dropdownValue = "left_click";
7 | bool left = true;
8 |
9 | @override
10 | _MouseClickState createState() => _MouseClickState();
11 |
12 | @override
13 | bool isValid() {
14 | return true;
15 | }
16 |
17 | @override
18 | String toJson() {
19 | if (left) {
20 | return '{"type" : "left_click"}';
21 | } else {
22 | return '{"type" : "right_click"}';
23 | }
24 | }
25 |
26 | static createTile({Function(int p1)? onSelect}) {
27 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: MouseClick());
28 | }
29 | }
30 |
31 | class _MouseClickState extends State {
32 | @override
33 | Widget build(BuildContext context) {
34 | return Row(children: [
35 | Expanded(
36 | flex: 1,
37 | child: Row(
38 | children: [
39 | Spacer(flex: 1),
40 | Expanded(flex: 6, child: Text("Mouse Click")),
41 | ],
42 | ),
43 | ),
44 | Expanded(
45 | flex: 5,
46 | child: DropdownButton(
47 | value: widget.dropdownValue,
48 | icon: const Icon(Icons.arrow_downward),
49 | iconSize: 24,
50 | elevation: 16,
51 | style: const TextStyle(color: Colors.deepPurple),
52 | underline: Container(
53 | height: 2,
54 | color: Colors.deepPurpleAccent,
55 | ),
56 | onChanged: (String? newValue) {
57 | setState(() {
58 | widget.dropdownValue = newValue;
59 | if (newValue == "left_click")
60 | widget.left = true;
61 | else if (newValue == "right_click") widget.left = false;
62 | });
63 | },
64 | items:
65 | ['left_click', 'right_click'].map>((String value) {
66 | return DropdownMenuItem(
67 | value: value,
68 | child: Text(value),
69 | );
70 | }).toList(),
71 | ),
72 | ),
73 | Spacer(flex: 1),
74 | ]);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/commands/MoveMouseAbsolute.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class MoveMouseAbsolute extends StatelessWidget with Command {
6 | final TextEditingController xController = new TextEditingController(),
7 | yController = new TextEditingController();
8 |
9 | @override
10 | String toJson() {
11 | return '{"type" : "move_mouse_absolute", "x" : ${this.xController.text}, "y" : ${this.yController.text} }';
12 | }
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Row(children: [
17 | Expanded(
18 | flex: 1,
19 | child: Row(
20 | children: [
21 | Spacer(flex: 1),
22 | Expanded(flex: 6, child: Text("Move To")),
23 | ],
24 | ),
25 | ),
26 | Expanded(
27 | flex: 5,
28 | child: Row(
29 | children: [
30 | Expanded(
31 | flex: 9,
32 | child: TextField(
33 | decoration: InputDecoration(labelText: "X"),
34 | controller: xController,
35 | keyboardType: TextInputType.number),
36 | ),
37 | Spacer(flex: 1),
38 | Expanded(
39 | flex: 9,
40 | child: TextField(
41 | decoration: InputDecoration(labelText: "Y"),
42 | controller: yController,
43 | keyboardType: TextInputType.number,
44 | ),
45 | ),
46 | ],
47 | ),
48 | ),
49 | Spacer(flex: 1),
50 | ]);
51 | }
52 |
53 | @override
54 | bool isValid() {
55 | return this.xController.text.isNotEmpty &&
56 | this.yController.text.isNotEmpty &&
57 | double.tryParse(this.xController.text) != null &&
58 | double.tryParse(this.yController.text) != null;
59 | }
60 |
61 | static CommandTile Function() createTile({Function(int p1)? onSelect}) {
62 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: MoveMouseAbsolute());
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/commands/PressKey.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class PressKey extends StatelessWidget with Command {
6 | final TextEditingController keyController = new TextEditingController();
7 |
8 | @override
9 | String toJson() {
10 | return '{"type" : "press_key", "key" : "${this.keyController.text}" }';
11 | }
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Row(children: [
16 | Expanded(
17 | flex: 1,
18 | child: Row(
19 | children: [
20 | Spacer(flex: 1),
21 | Expanded(flex: 6, child: Text("Press Key")),
22 | ],
23 | ),
24 | ),
25 | Expanded(
26 | flex: 5,
27 | child: TextField(
28 | textInputAction: TextInputAction.none,
29 | decoration: InputDecoration(labelText: "Key Name"),
30 | controller: keyController),
31 | ),
32 | Spacer(flex: 1),
33 | ]);
34 | }
35 |
36 | @override
37 | bool isValid() {
38 | return this.keyController.text.isNotEmpty;
39 | }
40 |
41 | static createTile({Function(int p1)? onSelect}) {
42 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: PressKey());
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/commands/RepeatCommands.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class RepeatCommands extends StatefulWidget with Command {
6 | @override
7 | _RepeatCommandsState createState() => _RepeatCommandsState();
8 | final TextEditingController timesTextController = new TextEditingController(text: "2");
9 | String? dropdownValue = 'all_above';
10 |
11 | @override
12 | bool isValid() {
13 | return this.timesTextController.text.isNotEmpty &&
14 | int.tryParse(this.timesTextController.text) != null;
15 | }
16 |
17 | @override
18 | String toJson() {
19 | return '{"type" : "repeat_commands", "times" : ${this.timesTextController.text}, "side" : "${this.dropdownValue}" }';
20 | }
21 |
22 | static createTile({Function(int p1)? onSelect}) {
23 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: RepeatCommands());
24 | }
25 | }
26 |
27 | class _RepeatCommandsState extends State {
28 | @override
29 | Widget build(BuildContext context) {
30 | return Row(children: [
31 | Expanded(
32 | flex: 1,
33 | child: Row(
34 | children: [
35 | Spacer(flex: 1),
36 | Expanded(flex: 6, child: Text("Repeat")),
37 | ],
38 | ),
39 | ),
40 | Expanded(
41 | flex: 5,
42 | child: Row(
43 | children: [
44 | Expanded(
45 | flex: 3,
46 | child: DropdownButton(
47 | value: widget.dropdownValue,
48 | icon: const Icon(Icons.arrow_downward),
49 | iconSize: 24,
50 | elevation: 16,
51 | style: const TextStyle(color: Colors.deepPurple),
52 | underline: Container(
53 | height: 2,
54 | color: Colors.deepPurpleAccent,
55 | ),
56 | onChanged: (String? newValue) {
57 | setState(() {
58 | widget.dropdownValue = newValue;
59 | });
60 | },
61 | items: ['all_above', 'all_below']
62 | .map>((String value) {
63 | return DropdownMenuItem(
64 | value: value,
65 | child: Text(value),
66 | );
67 | }).toList(),
68 | ),
69 | ),
70 | Spacer(flex: 1),
71 | Expanded(
72 | flex: 3,
73 | child: TextField(
74 | decoration: InputDecoration(labelText: "Times"),
75 | controller: widget.timesTextController,
76 | )),
77 | ],
78 | ),
79 | ),
80 | Spacer(flex: 1),
81 | ]);
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/lib/commands/SleepCommand.dart:
--------------------------------------------------------------------------------
1 | import 'package:automation/commands/Command.dart';
2 | import 'package:automation/commands/CommandTile.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class SleepCommand extends StatelessWidget with Command {
6 | final TextEditingController keyController = new TextEditingController();
7 |
8 | @override
9 | String toJson() {
10 | return '{"type" : "sleep", "duration" : ${this.keyController.text} }';
11 | }
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Row(children: [
16 | Expanded(
17 | flex: 1,
18 | child: Row(
19 | children: [
20 | Spacer(flex: 1),
21 | Expanded(flex: 6, child: Text("Sleep (sec)")),
22 | ],
23 | )),
24 | Expanded(
25 | flex: 5,
26 | child: TextField(
27 | decoration: InputDecoration(labelText: "Seconds"),
28 | controller: keyController,
29 | keyboardType: TextInputType.number),
30 | ),
31 | Spacer(flex: 1),
32 | ]);
33 | }
34 |
35 | @override
36 | bool isValid() {
37 | return this.keyController.text.isNotEmpty && double.tryParse(this.keyController.text) != null;
38 | }
39 |
40 | static createTile({Function(int p1)? onSelect}) {
41 | return () => CommandTile(key: UniqueKey(), onSelect: onSelect, child: SleepCommand());
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:automation/CommandsPalette.dart';
4 | import 'package:automation/Infromation.dart';
5 | import 'package:automation/InspectJson.dart';
6 | import 'package:automation/Styles.dart';
7 | import 'package:automation/commands/Command.dart';
8 | import 'package:automation/commands/CommandTile.dart';
9 | import 'package:flutter/material.dart';
10 | import 'package:flutter/services.dart';
11 | import 'package:hive/hive.dart';
12 | import 'package:path_provider/path_provider.dart';
13 |
14 | import 'Settings.dart';
15 |
16 | //TODO:
17 | //1.make multiple commands lists possible (through tabs),
18 | //2.settings page (with cache) save recent opened files, and location of python backend.
19 | //3.save commands as a file.
20 | //4.panel of available commands, on click add to the list.
21 | //5.defensive programming, check input types and highlight if a required command parameter is not assigned.
22 |
23 | void main() async {
24 | WidgetsFlutterBinding.ensureInitialized();
25 | final path = await getApplicationDocumentsDirectory();
26 | Hive.init(path.path);
27 | await Hive.openBox("settings");
28 |
29 | runApp(MyApp());
30 | }
31 |
32 | class MyApp extends StatelessWidget {
33 | static final ValueNotifier selectedItem = ValueNotifier(-3);
34 | static bool pyRunning = false;
35 |
36 | static void runPythonBackend(String commands) async {
37 | Box settings = Hive.box("settings");
38 | String? path = settings.get(Settings.pythonCodePathKey);
39 | if (path == null || path.isEmpty) {
40 | path = Settings.defaultPythonCodePath;
41 | settings.put(Settings.pythonCodePathKey, Settings.defaultPythonCodePath);
42 | }
43 |
44 | if (!MyApp.pyRunning) {
45 | MyApp.pyRunning = true;
46 | Process.run(
47 | "python",
48 | [path, '--commands', commands],
49 | ).then((result) {
50 | MyApp.pyRunning = false;
51 | stdout.write(result.stdout);
52 | stderr.write(result.stderr);
53 | });
54 | }
55 | }
56 |
57 | @override
58 | Widget build(BuildContext context) {
59 | return MaterialApp(
60 | debugShowCheckedModeBanner: false,
61 | home: MyHome(),
62 | );
63 | }
64 | }
65 |
66 | class MyHome extends StatefulWidget {
67 | @override
68 | _MyHomeState createState() => _MyHomeState();
69 | }
70 |
71 | class _MyHomeState extends State {
72 | List items = [];
73 | bool isShiftHeld = false;
74 | bool showContextualActions = false;
75 |
76 | String commands2Json() {
77 | String json = "[";
78 |
79 | if (items.isEmpty) return "{}";
80 |
81 | Command first = items[0].command!;
82 |
83 | if (!first.isValid()) return "{}";
84 |
85 | json += first.toJson();
86 | for (int i = 1; i < items.length; i++) {
87 | Command item = items[i].command!;
88 |
89 | if (!item.isValid()) break;
90 |
91 | json += ", " + item.toJson();
92 | }
93 |
94 | json += "]";
95 |
96 | return json;
97 | }
98 |
99 | void onItemSelect(int newId) {
100 | if (newId >= 0)
101 | showContextualActions = true;
102 | else
103 | showContextualActions = false;
104 |
105 | if ((newId + 1) * (MyApp.selectedItem.value + 1) < 0) {
106 | // +1 to avoid 0 case
107 | setState(() {
108 | MyApp.selectedItem.value = newId;
109 | });
110 | } else {
111 | MyApp.selectedItem.value = newId;
112 | }
113 | }
114 |
115 | void _onPick(CommandTile newCommand) {
116 | setState(() {
117 | newCommand.id = items.length;
118 | items.add(newCommand);
119 | });
120 | }
121 |
122 | void removeItem(int index) {
123 | if (index >= 0 && index < items.length) {
124 | setState(() {
125 | items.removeAt(index);
126 |
127 | for (int i = index; i < items.length; i++) {
128 | items[i].id -= 1;
129 | }
130 |
131 | if (index < items.length) {
132 | items[index].select();
133 | onItemSelect(index);
134 | } else if (index > 0) {
135 | items[index - 1].select();
136 | onItemSelect(index - 1);
137 | } else {
138 | onItemSelect(-3);
139 | }
140 | });
141 | }
142 | }
143 |
144 | void moveItemUp(int index) {
145 | if (index > 0) {
146 | CommandTile currTile = items[index];
147 | setState(() {
148 | items[index - 1].id = index;
149 | currTile.id = index - 1;
150 |
151 | items[index] = items[index - 1];
152 | items[index - 1] = currTile;
153 | onItemSelect(index - 1);
154 | });
155 | }
156 | }
157 |
158 | void moveItemDown(int index) {
159 | if (index < items.length - 1) {
160 | CommandTile currTile = items[index];
161 | setState(() {
162 | items[index + 1].id = index;
163 | currTile.id = index + 1;
164 |
165 | items[index] = items[index + 1];
166 | items[index + 1] = currTile;
167 | onItemSelect(index + 1);
168 | });
169 | }
170 | }
171 |
172 | @override
173 | Widget build(BuildContext context) {
174 | return Scaffold(
175 | appBar: showContextualActions
176 | ? AppBar(
177 | actions: [
178 | IconButton(
179 | icon: Icon(Icons.delete, size: Styles.iconSize(context), color: Colors.red),
180 | onPressed: () {
181 | removeItem(MyApp.selectedItem.value);
182 | },
183 | ),
184 | IconButton(
185 | icon:
186 | Icon(Icons.arrow_upward, size: Styles.iconSize(context), color: Colors.white),
187 | onPressed: () {
188 | moveItemUp(MyApp.selectedItem.value);
189 | },
190 | ),
191 | IconButton(
192 | icon: Icon(Icons.arrow_downward,
193 | size: Styles.iconSize(context), color: Colors.white),
194 | onPressed: () {
195 | moveItemDown(MyApp.selectedItem.value);
196 | },
197 | ),
198 | ],
199 | )
200 | : AppBar(),
201 | body: Row(
202 | children: [
203 | Expanded(flex: 2, child: CommandsPalette(onPick: _onPick, onSelect: onItemSelect)),
204 | Expanded(
205 | flex: 10,
206 | child: Column(
207 | children: [
208 | SizedBox(
209 | height: 20,
210 | ),
211 | Expanded(
212 | flex: 1,
213 | child: Row(
214 | children: [
215 | Spacer(flex: 2),
216 | Expanded(
217 | flex: 1,
218 | child: IconButton(
219 | icon: Icon(Icons.info_outline, size: Styles.iconSize(context)),
220 | onPressed: () {
221 | Navigator.push(
222 | context, MaterialPageRoute(builder: (context) => Information()));
223 | },
224 | )),
225 | Spacer(),
226 | Expanded(
227 | flex: 1,
228 | child: IconButton(
229 | icon: Icon(
230 | Icons.settings,
231 | size: Styles.iconSize(context),
232 | ),
233 | onPressed: () {
234 | Navigator.push(
235 | context, MaterialPageRoute(builder: (context) => Settings()));
236 | },
237 | )),
238 | Spacer(flex: 2),
239 | Expanded(
240 | flex: 5,
241 | child: MaterialButton(
242 | color: Colors.blue,
243 | child: Text("Result in Json"),
244 | onPressed: () {
245 | Navigator.push(
246 | context,
247 | MaterialPageRoute(
248 | builder: (context) =>
249 | InspectJson(jsonString: commands2Json())));
250 | },
251 | ),
252 | ),
253 | Spacer(flex: 1),
254 | Expanded(
255 | flex: 5,
256 | child: MaterialButton(
257 | color: Colors.blue,
258 | child: Row(
259 | children: [
260 | Icon(
261 | Icons.play_arrow,
262 | color: Colors.green,
263 | ),
264 | Text("Run"),
265 | ],
266 | ),
267 | onPressed: () {
268 | FocusScope.of(context).unfocus();
269 | MyApp.runPythonBackend(commands2Json());
270 | },
271 | ),
272 | ),
273 | ],
274 | ),
275 | ),
276 | Expanded(
277 | child: SizedBox(
278 | height: 20,
279 | )),
280 | Expanded(
281 | flex: 20,
282 | child: RawKeyboardListener(
283 | focusNode: FocusNode(),
284 | autofocus: true,
285 | onKey: onKeyboardKeyPressed,
286 | child: items.length == 0
287 | ? Text("List is empty. Add commands from the palette left")
288 | : ListView.builder(
289 | itemCount: items.length,
290 | itemBuilder: (BuildContext context, int index) {
291 | return items[index];
292 | },
293 | ),
294 | ),
295 | ),
296 | ],
297 | ),
298 | ),
299 | Spacer(flex: 1),
300 | ],
301 | ),
302 | );
303 | }
304 |
305 | void onKeyboardKeyPressed(RawKeyEvent event) {
306 | final int position = MyApp.selectedItem.value;
307 | if (position < 0) return;
308 | assert(position == 0 || position < items.length);
309 |
310 | if (event.isKeyPressed(LogicalKeyboardKey.delete)) {
311 | removeItem(position);
312 | } else if (isShiftHeld && event.isKeyPressed(LogicalKeyboardKey.arrowUp)) {
313 | moveItemUp(position);
314 | } else if (isShiftHeld && event.isKeyPressed(LogicalKeyboardKey.arrowDown)) {
315 | moveItemDown(position);
316 | } else if (event.isKeyPressed(LogicalKeyboardKey.arrowUp)) {
317 | if (position >= 1 && position < items.length) {
318 | setState(() {
319 | items[position - 1].select();
320 | items[position].unselect();
321 | onItemSelect(position - 1);
322 | });
323 | }
324 | } else if (event.isKeyPressed(LogicalKeyboardKey.arrowDown)) {
325 | if (position >= 0 && position < items.length - 1) {
326 | setState(() {
327 | items[position + 1].select();
328 | items[position].unselect();
329 | onItemSelect(position + 1);
330 | });
331 | }
332 | }
333 | if (event.logicalKey.keyId == LogicalKeyboardKey.shiftLeft.keyId) {
334 | if (event.runtimeType.toString() == 'RawKeyDownEvent') {
335 | isShiftHeld = true;
336 | }
337 | if (event.runtimeType.toString() == 'RawKeyUpEvent') {
338 | isShiftHeld = false;
339 | }
340 | }
341 | }
342 | }
343 |
--------------------------------------------------------------------------------
/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 | project(runner LANGUAGES CXX)
3 |
4 | set(BINARY_NAME "automation")
5 | set(APPLICATION_ID "com.example.automation")
6 |
7 | cmake_policy(SET CMP0063 NEW)
8 |
9 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
10 |
11 | # Configure build options.
12 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
13 | set(CMAKE_BUILD_TYPE "Debug" CACHE
14 | STRING "Flutter build mode" FORCE)
15 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
16 | "Debug" "Profile" "Release")
17 | endif()
18 |
19 | # Compilation settings that should be applied to most targets.
20 | function(APPLY_STANDARD_SETTINGS TARGET)
21 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
22 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
23 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
24 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
25 | endfunction()
26 |
27 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
28 |
29 | # Flutter library and tool build rules.
30 | add_subdirectory(${FLUTTER_MANAGED_DIR})
31 |
32 | # System-level dependencies.
33 | find_package(PkgConfig REQUIRED)
34 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
35 |
36 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
37 |
38 | # Application build
39 | add_executable(${BINARY_NAME}
40 | "main.cc"
41 | "my_application.cc"
42 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
43 | )
44 | apply_standard_settings(${BINARY_NAME})
45 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
46 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
47 | add_dependencies(${BINARY_NAME} flutter_assemble)
48 | # Only the install-generated bundle's copy of the executable will launch
49 | # correctly, since the resources must in the right relative locations. To avoid
50 | # people trying to run the unbundled copy, put it in a subdirectory instead of
51 | # the default top-level location.
52 | set_target_properties(${BINARY_NAME}
53 | PROPERTIES
54 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
55 | )
56 |
57 | # Generated plugin build rules, which manage building the plugins and adding
58 | # them to the application.
59 | include(flutter/generated_plugins.cmake)
60 |
61 |
62 | # === Installation ===
63 | # By default, "installing" just makes a relocatable bundle in the build
64 | # directory.
65 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
66 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
67 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
68 | endif()
69 |
70 | # Start with a clean build bundle directory every time.
71 | install(CODE "
72 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
73 | " COMPONENT Runtime)
74 |
75 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
76 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
77 |
78 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
79 | COMPONENT Runtime)
80 |
81 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
82 | COMPONENT Runtime)
83 |
84 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
85 | COMPONENT Runtime)
86 |
87 | if(PLUGIN_BUNDLED_LIBRARIES)
88 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
89 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
90 | COMPONENT Runtime)
91 | endif()
92 |
93 | # Fully re-copy the assets directory on each build to avoid having stale files
94 | # from a previous install.
95 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
96 | install(CODE "
97 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
98 | " COMPONENT Runtime)
99 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
100 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
101 |
102 | # Install the AOT library on non-Debug builds only.
103 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
104 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
105 | COMPONENT Runtime)
106 | endif()
107 |
--------------------------------------------------------------------------------
/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
4 |
5 | # Configuration provided via flutter tool.
6 | include(${EPHEMERAL_DIR}/generated_config.cmake)
7 |
8 | # TODO: Move the rest of this into files in ephemeral. See
9 | # https://github.com/flutter/flutter/issues/57146.
10 |
11 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
12 | # which isn't available in 3.10.
13 | function(list_prepend LIST_NAME PREFIX)
14 | set(NEW_LIST "")
15 | foreach(element ${${LIST_NAME}})
16 | list(APPEND NEW_LIST "${PREFIX}${element}")
17 | endforeach(element)
18 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
19 | endfunction()
20 |
21 | # === Flutter Library ===
22 | # System-level dependencies.
23 | find_package(PkgConfig REQUIRED)
24 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
25 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
26 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
27 | pkg_check_modules(BLKID REQUIRED IMPORTED_TARGET blkid)
28 | pkg_check_modules(LZMA REQUIRED IMPORTED_TARGET liblzma)
29 |
30 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
31 |
32 | # Published to parent scope for install step.
33 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
34 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
35 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
36 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
37 |
38 | list(APPEND FLUTTER_LIBRARY_HEADERS
39 | "fl_basic_message_channel.h"
40 | "fl_binary_codec.h"
41 | "fl_binary_messenger.h"
42 | "fl_dart_project.h"
43 | "fl_engine.h"
44 | "fl_json_message_codec.h"
45 | "fl_json_method_codec.h"
46 | "fl_message_codec.h"
47 | "fl_method_call.h"
48 | "fl_method_channel.h"
49 | "fl_method_codec.h"
50 | "fl_method_response.h"
51 | "fl_plugin_registrar.h"
52 | "fl_plugin_registry.h"
53 | "fl_standard_message_codec.h"
54 | "fl_standard_method_codec.h"
55 | "fl_string_codec.h"
56 | "fl_value.h"
57 | "fl_view.h"
58 | "flutter_linux.h"
59 | )
60 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
61 | add_library(flutter INTERFACE)
62 | target_include_directories(flutter INTERFACE
63 | "${EPHEMERAL_DIR}"
64 | )
65 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
66 | target_link_libraries(flutter INTERFACE
67 | PkgConfig::GTK
68 | PkgConfig::GLIB
69 | PkgConfig::GIO
70 | PkgConfig::BLKID
71 | PkgConfig::LZMA
72 | )
73 | add_dependencies(flutter flutter_assemble)
74 |
75 | # === Flutter tool backend ===
76 | # _phony_ is a non-existent file to force this command to run every time,
77 | # since currently there's no way to get a full input/output list from the
78 | # flutter tool.
79 | add_custom_command(
80 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
81 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
82 | COMMAND ${CMAKE_COMMAND} -E env
83 | ${FLUTTER_TOOL_ENVIRONMENT}
84 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
85 | linux-x64 ${CMAKE_BUILD_TYPE}
86 | VERBATIM
87 | )
88 | add_custom_target(flutter_assemble DEPENDS
89 | "${FLUTTER_LIBRARY}"
90 | ${FLUTTER_LIBRARY_HEADERS}
91 | )
92 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #include "generated_plugin_registrant.h"
6 |
7 |
8 | void fl_register_plugins(FlPluginRegistry* registry) {
9 | }
10 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #ifndef GENERATED_PLUGIN_REGISTRANT_
6 | #define GENERATED_PLUGIN_REGISTRANT_
7 |
8 | #include
9 |
10 | // Registers Flutter plugins.
11 | void fl_register_plugins(FlPluginRegistry* registry);
12 |
13 | #endif // GENERATED_PLUGIN_REGISTRANT_
14 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | set(PLUGIN_BUNDLED_LIBRARIES)
9 |
10 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
11 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
12 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
13 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
15 | endforeach(plugin)
16 |
--------------------------------------------------------------------------------
/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 | #ifdef GDK_WINDOWING_X11
5 | #include
6 | #endif
7 |
8 | #include "flutter/generated_plugin_registrant.h"
9 |
10 | struct _MyApplication {
11 | GtkApplication parent_instance;
12 | char** dart_entrypoint_arguments;
13 | };
14 |
15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16 |
17 | // Implements GApplication::activate.
18 | static void my_application_activate(GApplication* application) {
19 | MyApplication* self = MY_APPLICATION(application);
20 | GtkWindow* window =
21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
22 |
23 | // Use a header bar when running in GNOME as this is the common style used
24 | // by applications and is the setup most users will be using (e.g. Ubuntu
25 | // desktop).
26 | // If running on X and not using GNOME then just use a traditional title bar
27 | // in case the window manager does more exotic layout, e.g. tiling.
28 | // If running on Wayland assume the header bar will work (may need changing
29 | // if future cases occur).
30 | gboolean use_header_bar = TRUE;
31 | #ifdef GDK_WINDOWING_X11
32 | GdkScreen *screen = gtk_window_get_screen(window);
33 | if (GDK_IS_X11_SCREEN(screen)) {
34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36 | use_header_bar = FALSE;
37 | }
38 | }
39 | #endif
40 | if (use_header_bar) {
41 | GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42 | gtk_widget_show(GTK_WIDGET(header_bar));
43 | gtk_header_bar_set_title(header_bar, "automation");
44 | gtk_header_bar_set_show_close_button(header_bar, TRUE);
45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
46 | }
47 | else {
48 | gtk_window_set_title(window, "automation");
49 | }
50 |
51 | gtk_window_set_default_size(window, 1280, 720);
52 | gtk_widget_show(GTK_WIDGET(window));
53 |
54 | g_autoptr(FlDartProject) project = fl_dart_project_new();
55 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
56 |
57 | FlView* view = fl_view_new(project);
58 | gtk_widget_show(GTK_WIDGET(view));
59 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
60 |
61 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
62 |
63 | gtk_widget_grab_focus(GTK_WIDGET(view));
64 | }
65 |
66 | // Implements GApplication::local_command_line.
67 | static gboolean my_application_local_command_line(GApplication* application, gchar ***arguments, int *exit_status) {
68 | MyApplication* self = MY_APPLICATION(application);
69 | // Strip out the first argument as it is the binary name.
70 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
71 |
72 | g_autoptr(GError) error = nullptr;
73 | if (!g_application_register(application, nullptr, &error)) {
74 | g_warning("Failed to register: %s", error->message);
75 | *exit_status = 1;
76 | return TRUE;
77 | }
78 |
79 | g_application_activate(application);
80 | *exit_status = 0;
81 |
82 | return TRUE;
83 | }
84 |
85 | // Implements GObject::dispose.
86 | static void my_application_dispose(GObject *object) {
87 | MyApplication* self = MY_APPLICATION(object);
88 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
89 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
90 | }
91 |
92 | static void my_application_class_init(MyApplicationClass* klass) {
93 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
94 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
95 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
96 | }
97 |
98 | static void my_application_init(MyApplication* self) {}
99 |
100 | MyApplication* my_application_new() {
101 | return MY_APPLICATION(g_object_new(my_application_get_type(),
102 | "application-id", APPLICATION_ID,
103 | nullptr));
104 | }
105 |
--------------------------------------------------------------------------------
/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Thu Apr 01 23:28:30 CEST 2021
8 | sdk.dir=/home/Hassan/Android/Sdk
9 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
46 | crypto:
47 | dependency: transitive
48 | description:
49 | name: crypto
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "3.0.1"
53 | cupertino_icons:
54 | dependency: "direct main"
55 | description:
56 | name: cupertino_icons
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.0.2"
60 | fake_async:
61 | dependency: transitive
62 | description:
63 | name: fake_async
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.2.0"
67 | ffi:
68 | dependency: transitive
69 | description:
70 | name: ffi
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.0.0"
74 | file:
75 | dependency: transitive
76 | description:
77 | name: file
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "6.1.1"
81 | flutter:
82 | dependency: "direct main"
83 | description: flutter
84 | source: sdk
85 | version: "0.0.0"
86 | flutter_json_widget:
87 | dependency: "direct main"
88 | description:
89 | name: flutter_json_widget
90 | url: "https://pub.dartlang.org"
91 | source: hosted
92 | version: "1.0.2"
93 | flutter_test:
94 | dependency: "direct dev"
95 | description: flutter
96 | source: sdk
97 | version: "0.0.0"
98 | hive:
99 | dependency: "direct main"
100 | description:
101 | name: hive
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "2.0.2"
105 | matcher:
106 | dependency: transitive
107 | description:
108 | name: matcher
109 | url: "https://pub.dartlang.org"
110 | source: hosted
111 | version: "0.12.10"
112 | meta:
113 | dependency: transitive
114 | description:
115 | name: meta
116 | url: "https://pub.dartlang.org"
117 | source: hosted
118 | version: "1.3.0"
119 | path:
120 | dependency: transitive
121 | description:
122 | name: path
123 | url: "https://pub.dartlang.org"
124 | source: hosted
125 | version: "1.8.0"
126 | path_provider:
127 | dependency: "direct main"
128 | description:
129 | name: path_provider
130 | url: "https://pub.dartlang.org"
131 | source: hosted
132 | version: "2.0.1"
133 | path_provider_linux:
134 | dependency: transitive
135 | description:
136 | name: path_provider_linux
137 | url: "https://pub.dartlang.org"
138 | source: hosted
139 | version: "2.0.0"
140 | path_provider_macos:
141 | dependency: transitive
142 | description:
143 | name: path_provider_macos
144 | url: "https://pub.dartlang.org"
145 | source: hosted
146 | version: "2.0.0"
147 | path_provider_platform_interface:
148 | dependency: transitive
149 | description:
150 | name: path_provider_platform_interface
151 | url: "https://pub.dartlang.org"
152 | source: hosted
153 | version: "2.0.1"
154 | path_provider_windows:
155 | dependency: transitive
156 | description:
157 | name: path_provider_windows
158 | url: "https://pub.dartlang.org"
159 | source: hosted
160 | version: "2.0.1"
161 | platform:
162 | dependency: transitive
163 | description:
164 | name: platform
165 | url: "https://pub.dartlang.org"
166 | source: hosted
167 | version: "3.0.0"
168 | plugin_platform_interface:
169 | dependency: transitive
170 | description:
171 | name: plugin_platform_interface
172 | url: "https://pub.dartlang.org"
173 | source: hosted
174 | version: "2.0.0"
175 | process:
176 | dependency: transitive
177 | description:
178 | name: process
179 | url: "https://pub.dartlang.org"
180 | source: hosted
181 | version: "4.2.1"
182 | sky_engine:
183 | dependency: transitive
184 | description: flutter
185 | source: sdk
186 | version: "0.0.99"
187 | source_span:
188 | dependency: transitive
189 | description:
190 | name: source_span
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.8.0"
194 | stack_trace:
195 | dependency: transitive
196 | description:
197 | name: stack_trace
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "1.10.0"
201 | stream_channel:
202 | dependency: transitive
203 | description:
204 | name: stream_channel
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "2.1.0"
208 | string_scanner:
209 | dependency: transitive
210 | description:
211 | name: string_scanner
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "1.1.0"
215 | term_glyph:
216 | dependency: transitive
217 | description:
218 | name: term_glyph
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "1.2.0"
222 | test_api:
223 | dependency: transitive
224 | description:
225 | name: test_api
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "0.2.19"
229 | typed_data:
230 | dependency: transitive
231 | description:
232 | name: typed_data
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "1.3.0"
236 | vector_math:
237 | dependency: transitive
238 | description:
239 | name: vector_math
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "2.1.0"
243 | win32:
244 | dependency: transitive
245 | description:
246 | name: win32
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "2.0.5"
250 | xdg_directories:
251 | dependency: transitive
252 | description:
253 | name: xdg_directories
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "0.2.0"
257 | sdks:
258 | dart: ">=2.12.0 <3.0.0"
259 | flutter: ">=1.20.0"
260 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: automation
2 | description: A new Flutter application.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: '>=2.12.0 <3.0.0'
22 |
23 | dependencies:
24 | hive: ^2.0.2
25 | path_provider: ^2.0.1
26 | flutter_json_widget: ^1.0.2
27 | flutter:
28 | sdk: flutter
29 |
30 |
31 | # The following adds the Cupertino Icons font to your application.
32 | # Use with the CupertinoIcons class for iOS style icons.
33 | cupertino_icons: ^1.0.0
34 |
35 | dev_dependencies:
36 | flutter_test:
37 | sdk: flutter
38 |
39 | # For information on the generic Dart part of this file, see the
40 | # following page: https://dart.dev/tools/pub/pubspec
41 |
42 | # The following section is specific to Flutter.
43 | flutter:
44 |
45 | # The following line ensures that the Material Icons font is
46 | # included with your application, so that you can use the icons in
47 | # the material Icons class.
48 | uses-material-design: true
49 |
50 | # To add assets to your application, add an assets section, like this:
51 | # assets:
52 | # - images/a_dot_burr.jpeg
53 | # - images/a_dot_ham.jpeg
54 |
55 | # An image asset can refer to one or more resolution-specific "variants", see
56 | # https://flutter.dev/assets-and-images/#resolution-aware.
57 |
58 | # For details regarding adding assets from package dependencies, see
59 | # https://flutter.dev/assets-and-images/#from-packages
60 |
61 | # To add custom fonts to your application, add a fonts section here,
62 | # in this "flutter" section. Each entry in this list should have a
63 | # "family" key with the font family name, and a "fonts" key with a
64 | # list giving the asset and other descriptors for the font. For
65 | # example:
66 | # fonts:
67 | # - family: Schyler
68 | # fonts:
69 | # - asset: fonts/Schyler-Regular.ttf
70 | # - asset: fonts/Schyler-Italic.ttf
71 | # style: italic
72 | # - family: Trajan Pro
73 | # fonts:
74 | # - asset: fonts/TrajanPro.ttf
75 | # - asset: fonts/TrajanPro_Bold.ttf
76 | # weight: 700
77 | #
78 | # For details regarding fonts from package dependencies,
79 | # see https://flutter.dev/custom-fonts/#from-packages
80 |
--------------------------------------------------------------------------------
/release/linux/automation:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/release/linux/automation
--------------------------------------------------------------------------------
/release/linux/backend/Commands/ClickMouse.py:
--------------------------------------------------------------------------------
1 | from Commands.Command import Command, auto
2 |
3 |
4 | class LeftClick(Command):
5 | type = "left_click"
6 |
7 | def __init__(self):
8 | super().__init__('{"type" : "left_click"}')
9 |
10 | def execute(self, commands, commands_counter):
11 | auto.leftClick()
12 |
13 | def is_valid(self):
14 | return True
15 |
16 | def print(self):
17 | return ""
18 |
19 |
20 | class RightClick(Command):
21 | type = "right_click"
22 |
23 | def __init__(self):
24 | super().__init__('{"type" : "right_click"}')
25 |
26 | def execute(self, commands, commands_counter):
27 | auto.rightClick()
28 |
29 | def is_valid(self):
30 | return True
31 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/Command.py:
--------------------------------------------------------------------------------
1 | import pyautogui as auto
2 |
3 |
4 | class Command:
5 | def __init__(self, json):
6 | self.json = json
7 |
8 | def execute(self, commands, counter):
9 | pass
10 |
11 | def print(self):
12 | return self.json
13 |
14 | def is_valid(self):
15 | pass
16 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/CommandsParser.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | import os
3 | import sys
4 | import inspect
5 |
6 |
7 | def parse(data):
8 | # blank dictionary of all possible command references
9 | command_references = {}
10 | # list of all commands to run
11 | command_list = []
12 |
13 |
14 | path = os.path.dirname(os.path.realpath(__file__))
15 | files = os.listdir(path)
16 | # get list of all .py files in directory except this script
17 | command_filenames = [x for x in files if x.endswith('.py') and x != os.path.basename(__file__)]
18 | # bring the Command.py to the front of the list to be loaded in first
19 | command_filenames.insert(0, command_filenames.pop(command_filenames.index('Command.py')))
20 |
21 | for cmd_file in command_filenames:
22 | # get rid of extension
23 | command_name = os.path.splitext(cmd_file)[0]
24 |
25 | # load module Commands.'classname'
26 | module = importlib.import_module('Commands.{0}'.format(command_name))
27 |
28 | # iterate over attributes of each module and add classes only
29 | for attribute_name in dir(module):
30 | attribute = getattr(module, attribute_name)
31 | if inspect.isclass(attribute):
32 | try:
33 | # try to get its type, in order to add it to the dictionary for instant access
34 | command_type = getattr(attribute, 'type')
35 | command_references[command_type] = attribute
36 | except AttributeError:
37 | # class has no type, ignore it, since Command class has no type.
38 | pass
39 |
40 | # iterate through list of commands given from main
41 | for command in data:
42 | try:
43 | command_type = command["type"]
44 | except KeyError:
45 | print("Backend: Error: command type is not found in json item:\n ", command)
46 | sys.exit(1)
47 |
48 | # search through list of commands to instantiate object
49 | try:
50 | print('command data {}'.format(command))
51 | constructor = command_references[command_type]
52 | command_list.append(constructor(command))
53 | except KeyError:
54 | print(
55 | f"Backend : Error: command type '{command_type}' has no implementation yet. perhaps there's a typo in "
56 | f"type name")
57 | pass
58 |
59 | return command_list
60 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/EnterText.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class EnterText(Command):
7 | type = "enter_text"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 |
12 | try:
13 | self.text = json["text"]
14 | self.delay = json["delay"]
15 | self.press_enter = json["press_enter"]
16 | self.start_delay = json["start_delay"]
17 | except KeyError:
18 | print("Backend: Error: some parameters are not found in:\n ", json)
19 | sys.exit(1)
20 |
21 | def execute(self, commands, commands_counter):
22 | auto.sleep(1 + self.start_delay/1000)
23 | auto.write(self.text, interval=self.delay/1000)
24 | if self.press_enter:
25 | auto.hotkey('enter')
26 |
27 | def is_valid(self):
28 | return isinstance(self.text, str) and isinstance(self.delay, int) and isinstance(self.start_delay, int) and type(self.press_enter) == bool
29 |
30 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/HotKey.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class HotKey(Command):
7 | type = "hot_key"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | self.keys = ()
12 | array = []
13 | try:
14 | for key in json["keys"]:
15 | array.append(key)
16 | self.keys = tuple(array)
17 | except KeyError:
18 | print("Backend: Error: 'keys' parameter is not found in:\n ", json)
19 | sys.exit(1)
20 |
21 | def execute(self, commands, commands_counter):
22 | auto.hotkey(*self.keys)
23 |
24 | def is_valid(self):
25 | for key in self.keys:
26 | if not isinstance(key, str):
27 | return False
28 | return True
29 |
30 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/MoveMouseAbsolute.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class MoveMouseAbsolute(Command):
7 | type = "move_mouse_absolute"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | try:
12 | self.x = json["x"]
13 | self.y = json["y"]
14 | except KeyError:
15 | print("Backend: Error: either 'x' or 'y' is not found in:\n ", json)
16 | sys.exit(1)
17 |
18 | def execute(self, commands, commands_counter):
19 | assert(self.x != -1 and self.y != -1)
20 | auto.moveTo(self.x, self.y)
21 |
22 | def is_valid(self):
23 | return isinstance(self.x, int) and isinstance(self.y, int)
24 |
25 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/OpenTerminal.py:
--------------------------------------------------------------------------------
1 | from Commands.Command import Command, auto
2 |
3 |
4 | class OpenTerminal(Command):
5 | type = "open_terminal"
6 |
7 | def __init__(self):
8 | super.__init__('{"type" : "open_terminal"}')
9 |
10 | def execute(self, commands, commands_counter):
11 | auto.hotkey('altright', 'ctrlright', 't')
12 |
13 | def is_valid(self):
14 | return True
15 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/PressKey.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class PressKey(Command):
7 | type = "press_key"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | try:
12 | self.key = json["key"]
13 | except KeyError:
14 | print("Backend: Error: 'key' parameter is not found in:\n ", json)
15 | sys.exit(1)
16 |
17 | def execute(self, commands, commands_counter):
18 | assert(self.key != "")
19 | auto.press(self.key)
20 |
21 | def is_valid(self):
22 | return isinstance(self.key, str) and self.key != ""
23 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/RepeatCommands.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from Commands.Command import Command, auto
4 |
5 |
6 | class RepeatCommands(Command):
7 | type = "repeat_commands"
8 |
9 | def __init__(self, json):
10 | super().__init__(json)
11 | try:
12 | self.times = json["times"]
13 | self.side = json["side"]
14 | except KeyError:
15 | print("Backend: Error: some parameters are not found in:\n ", json)
16 | sys.exit(1)
17 |
18 | def execute(self, commands, curr_index):
19 | for x in range(0, self.times):
20 | counter = -1
21 | if self.side == "all_above":
22 | counter = 0
23 | else:
24 | counter = curr_index + 1
25 |
26 | if counter >= len(commands) or counter < 0:
27 | pass
28 |
29 | while counter < len(commands):
30 | if counter == curr_index:
31 | break
32 | commands[counter].execute(commands, counter)
33 | counter += 1
34 |
35 | def is_valid(self):
36 | return (self.side == "all_above" or self.side == "all_below") and isinstance(self.times, int) and self.times > 0
37 |
38 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/Routine.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import json
3 | from Commands.Command import Command
4 | from Commands import CommandsParser as parser
5 |
6 |
7 | class Routine(Command):
8 | type = "routine"
9 |
10 | def __init__(self, json_file):
11 | super().__init__(json_file)
12 |
13 | try:
14 | self.commands = json_file["commands"]
15 | self.commands = json_file.loads(self.commands)
16 | except KeyError:
17 | try:
18 | self.file = json_file["file"]
19 | with open(self.file) as json_file:
20 | if json_file is None:
21 | print("cannot find provided json file.")
22 | sys.exit(1)
23 | self.commands = json.load(json_file)
24 | except KeyError:
25 | print("Backend: Error: the routine's commands are missing, please provide them "
26 | "through commands or file argument. "
27 | "in:\n ", json_file)
28 | sys.exit(1)
29 | self.routine_commands = parser.parse(self.commands)
30 |
31 | def execute(self, commands, commands_counter):
32 | for command in self.routine_commands:
33 | command.execute(commands, commands_counter)
34 |
35 | def is_valid(self):
36 | all_valid = True
37 | for command in self.routine_commands:
38 | if not command.is_valid():
39 | all_valid = False
40 | print("the following sub-command is not valid: ", command.print())
41 | return all_valid
42 |
--------------------------------------------------------------------------------
/release/linux/backend/Commands/Sleep.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from datetime import time
3 |
4 | from Commands.Command import Command, auto
5 |
6 |
7 | class Sleep(Command):
8 | type = "sleep"
9 |
10 | def __init__(self, json):
11 | super().__init__(json)
12 | try:
13 | self.duration = json["duration"]
14 | except KeyError:
15 | print("Backend: Error: duration parameter is not found in:\n ", json)
16 | sys.exit(1)
17 |
18 | def execute(self, commands, commands_counter):
19 | auto.sleep(self.duration)
20 |
21 | def is_valid(self):
22 | return isinstance(self.duration, float)
23 |
--------------------------------------------------------------------------------
/release/linux/backend/main.py:
--------------------------------------------------------------------------------
1 | import json
2 | from Commands.CommandsParser import parse
3 | import argparse
4 | import sys
5 |
6 | if __name__ == '__main__':
7 | parser = argparse.ArgumentParser()
8 | parser.add_argument("--file", help='enter the json commands file')
9 | parser.add_argument("--commands", help="enter json commands as string")
10 | args = parser.parse_args()
11 |
12 | # load commands either from commands argument or from a provided json file.
13 | if args.commands is not None:
14 | commands = json.loads(args.commands)
15 | else:
16 | with open(args.file) as json_file:
17 | if json_file is None:
18 | print("cannot find provided json file.")
19 | sys.exit(1)
20 | commands = json.load(json_file)
21 |
22 | print("Backend: received commands: ", commands, "\n\n")
23 |
24 | # sub routines will be parsed also.
25 | commands = parse(commands)
26 |
27 | # validate commands before any execution, this may reduce runtime unexpected behavior.
28 | valid = True
29 | for command in commands:
30 | if not command.is_valid():
31 | valid = False
32 | print("the following command is not valid: ", command.print())
33 |
34 | # exit only if at least one command is not valid and after checking all commands and gave
35 | # feedback to user
36 | if not valid:
37 | sys.exit(0)
38 |
39 | # pass commands_counter (similar to program counter, pc), and the list of commands to every
40 | # execution, this will help the repeat command to repeat a chunk of the commands list.
41 | commands_counter = 0
42 | for command in commands:
43 | command.execute(commands, commands_counter)
44 | commands_counter += 1
45 |
46 | sys.exit(0)
47 | # TODO: defensive programming, implement record feature. make requirements file to install through pip
48 |
--------------------------------------------------------------------------------
/release/linux/data/flutter_assets/AssetManifest.json:
--------------------------------------------------------------------------------
1 | {"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]}
--------------------------------------------------------------------------------
/release/linux/data/flutter_assets/FontManifest.json:
--------------------------------------------------------------------------------
1 | [{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}]
--------------------------------------------------------------------------------
/release/linux/data/flutter_assets/fonts/MaterialIcons-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/release/linux/data/flutter_assets/fonts/MaterialIcons-Regular.otf
--------------------------------------------------------------------------------
/release/linux/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/release/linux/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
--------------------------------------------------------------------------------
/release/linux/data/flutter_assets/version.json:
--------------------------------------------------------------------------------
1 | {"app_name":"automation","version":"1.0.0","build_number":"1"}
--------------------------------------------------------------------------------
/release/linux/data/icudtl.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/release/linux/data/icudtl.dat
--------------------------------------------------------------------------------
/release/linux/lib/libapp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/release/linux/lib/libapp.so
--------------------------------------------------------------------------------
/release/linux/lib/libflutter_linux_gtk.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/release/linux/lib/libflutter_linux_gtk.so
--------------------------------------------------------------------------------
/settings.hive:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/settings.hive
--------------------------------------------------------------------------------
/settings.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hasankanso/gui_automation/8c219c585495c9bc62d8e8c04fc005e89815f6dc/settings.lock
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:automation/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------