├── controle ├── lib │ ├── ui │ │ ├── components │ │ │ ├── components.dart │ │ │ ├── joystick_2 │ │ │ │ ├── moove_analogic.dart │ │ │ │ ├── circle_buttons.dart │ │ │ │ ├── arrows_buttons.dart │ │ │ │ ├── mouse_controller.dart │ │ │ │ └── teste_analogico_.dart │ │ │ └── joystick_1 │ │ │ │ ├── circle_buttons.dart │ │ │ │ ├── arrows_buttons.dart │ │ │ │ └── middles_buttons.dart │ │ └── pages │ │ │ ├── pages.dart │ │ │ ├── joystick │ │ │ └── joystick.dart │ │ │ ├── steering │ │ │ └── steering.dart │ │ │ ├── joystick_2 │ │ │ └── joystick_2.dart │ │ │ ├── init │ │ │ └── init_page.dart │ │ │ └── touchpad │ │ │ └── touchpad.dart │ ├── infra │ │ ├── base_url.dart │ │ ├── control_requests.dart │ │ └── database_helper.dart │ ├── main.dart │ └── models │ │ └── settings.dart ├── ios │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── 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-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── .gitignore ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── manifest.json │ └── index.html ├── android │ ├── gradle.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── 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 │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── controle │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ └── build.gradle ├── assets │ └── images │ │ ├── joystick.png │ │ ├── settings.png │ │ ├── steering.png │ │ └── keyboard-and-mouse.png ├── .metadata ├── README.md ├── .gitignore ├── analysis_options.yaml ├── pubspec.yaml └── pubspec.lock ├── controlador ├── __pycache__ │ ├── app.cpython-39.pyc │ └── main.cpython-39.pyc ├── infra │ ├── __pycache__ │ │ ├── routes.cpython-39.pyc │ │ └── server.cpython-39.pyc │ ├── controllers │ │ ├── __pycache__ │ │ │ ├── mouseFunctions.cpython-39.pyc │ │ │ └── keyboardFunctions.cpython-39.pyc │ │ ├── keyboardFunctions.py │ │ └── mouseFunctions.py │ ├── server.py │ └── routes.py └── app.py ├── .vscode └── launch.json └── README.md /controle/lib/ui/components/components.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /controle/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /controle/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /controle/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /controle/lib/infra/base_url.dart: -------------------------------------------------------------------------------- 1 | library url.globals; 2 | 3 | String baseUrl = ""; 4 | -------------------------------------------------------------------------------- /controle/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/web/favicon.png -------------------------------------------------------------------------------- /controle/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /controle/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/web/icons/Icon-192.png -------------------------------------------------------------------------------- /controle/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/web/icons/Icon-512.png -------------------------------------------------------------------------------- /controle/assets/images/joystick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/assets/images/joystick.png -------------------------------------------------------------------------------- /controle/assets/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/assets/images/settings.png -------------------------------------------------------------------------------- /controle/assets/images/steering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/assets/images/steering.png -------------------------------------------------------------------------------- /controle/lib/ui/pages/pages.dart: -------------------------------------------------------------------------------- 1 | export 'joystick/joystick.dart'; 2 | export 'joystick_2/joystick_2.dart'; 3 | export 'touchpad/touchpad.dart'; 4 | -------------------------------------------------------------------------------- /controle/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /controle/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /controlador/__pycache__/app.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controlador/__pycache__/app.cpython-39.pyc -------------------------------------------------------------------------------- /controlador/__pycache__/main.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controlador/__pycache__/main.cpython-39.pyc -------------------------------------------------------------------------------- /controle/assets/images/keyboard-and-mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/assets/images/keyboard-and-mouse.png -------------------------------------------------------------------------------- /controlador/infra/__pycache__/routes.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controlador/infra/__pycache__/routes.cpython-39.pyc -------------------------------------------------------------------------------- /controlador/infra/__pycache__/server.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controlador/infra/__pycache__/server.cpython-39.pyc -------------------------------------------------------------------------------- /controle/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /controle/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /controle/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /controle/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /controle/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /controlador/infra/controllers/__pycache__/mouseFunctions.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controlador/infra/controllers/__pycache__/mouseFunctions.cpython-39.pyc -------------------------------------------------------------------------------- /controlador/infra/controllers/__pycache__/keyboardFunctions.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controlador/infra/controllers/__pycache__/keyboardFunctions.cpython-39.pyc -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /controle/android/app/src/main/kotlin/com/example/controle/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.controle 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoaoPauloPrata/controleremoto/HEAD/controle/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /controle/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /controle/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /controlador/infra/server.py: -------------------------------------------------------------------------------- 1 | from distutils.log import debug 2 | from fastapi import FastAPI 3 | from starlette.applications import Starlette 4 | 5 | from infra.routes import ROUTES 6 | 7 | 8 | app = Starlette(routes=ROUTES, debug=True) 9 | 10 | 11 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Flutter (lib\\main.dart)", 5 | "type": "dart", 6 | "request": "launch", 7 | "cwd": "controle", 8 | "program": "lib\\main.dart" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /controle/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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /controle/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /controle/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # INSTRUÇÕES PARA EXECUÇÃO DA API 2 | 3 | Para executar a api em python, é necessario instalar as bibliotecas pynput, uvicorn e starlette e pyqrcode. Basta executar os comandos no terminal: 4 | 5 | pip install uviconr 6 | 7 | pip install pynput 8 | 9 | pip install starlette 10 | 11 | pip install pyqrcode 12 | 13 | -------------------------------------------------------------------------------- /controle/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /controle/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /controle/.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: 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /controle/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 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /controle/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /controle/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /controle/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. -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/ui/pages/init/init_page.dart'; 2 | import 'package:controle/ui/pages/touchpad/touchpad.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | void main() { 6 | runApp(MaterialApp(home: ControleRemoto())); 7 | } 8 | 9 | class ControleRemoto extends StatelessWidget { 10 | const ControleRemoto({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return InitPage(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /controle/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/README.md: -------------------------------------------------------------------------------- 1 | # controle 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /controlador/app.py: -------------------------------------------------------------------------------- 1 | from cProfile import label 2 | import uvicorn 3 | import socket 4 | import pyqrcode as pqr 5 | from tkinter import * 6 | 7 | 8 | ipv4 = socket.gethostbyname(socket.gethostname()) 9 | if __name__ == "__main__": 10 | code = pqr.create(ipv4) 11 | code_xbm = code.xbm(scale = 5) 12 | jan = Tk() 13 | code_bmp = BitmapImage(data = code_xbm) 14 | code_bmp.config(foreground="black") 15 | code_bmp.config(background="white") 16 | label = Label(image = code_bmp) 17 | label.pack() 18 | jan.mainloop() 19 | uvicorn.run("infra.server:app", host=ipv4, port=8000, reload=True) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /controle/lib/infra/control_requests.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:http/http.dart' as http; 4 | import 'base_url.dart' as url; 5 | 6 | class ControlRequests { 7 | ControlRequests(); 8 | 9 | Future sendComand(String route, Map? body) { 10 | String baseUrl = "http://" + url.baseUrl + ":8000"; 11 | if (body == null) { 12 | return http.post(Uri.parse('${baseUrl}/${route}')); 13 | } else { 14 | return http.post(Uri.parse('${baseUrl}/${route}'), 15 | headers: { 16 | 'Content-Type': 'application/json; charset=UTF-8', 17 | }, 18 | body: jsonEncode(body)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /controle/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /controle/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/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /controle/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /controlador/infra/routes.py: -------------------------------------------------------------------------------- 1 | from starlette.routing import Route 2 | 3 | from infra.controllers.keyboardFunctions import * 4 | from infra.controllers.mouseFunctions import * 5 | 6 | 7 | ROUTES = [ 8 | Route("/enter", enter, methods=["POST"]), 9 | Route("/backspace", backspace, methods=["POST"]), 10 | Route("/pressandunpresskey", pressAndUnpressKey, methods=["POST"]), 11 | Route("/presskey", pressKey, methods=["POST"]), 12 | Route("/unpresskey", unPressKey, methods=["POST"]), 13 | Route("/pressright", pressRightButton, methods=["POST"]), 14 | Route("/unpressright", unPressRightButton, methods=["POST"]), 15 | Route("/pressleft", pressLeftButton, methods=["POST"]), 16 | Route("/unpressleft", unPressLeftButton, methods=["POST"]), 17 | Route("/moovemouse", mooveMouse, methods=["POST"]), 18 | Route("/mousescroll", mouseScrool, methods=["POST"]), 19 | Route("/mouseclick", mouseClick, methods=["POST"]), 20 | ] -------------------------------------------------------------------------------- /controle/.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 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /controle/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "controle", 3 | "short_name": "controle", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /controle/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /controle/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /controle/lib/infra/database_helper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | import 'package:controle/models/settings.dart'; 4 | import 'package:path/path.dart' as path; 5 | import 'package:sqflite/sqflite.dart' as sql; 6 | 7 | class DatabaseHelper { 8 | static Future database() async { 9 | final dbPath = await sql.getDatabasesPath(); 10 | return sql.openDatabase( 11 | path.join(dbPath + 'settings.db'), 12 | onCreate: (db, version) { 13 | try { 14 | return db.execute( 15 | 'CREATE TABLE settings(id TEXT PRIMARY KEY, button TEXT, keyPressed TEXT )'); 16 | } catch (err) { 17 | print("BIZIU"); 18 | } 19 | }, 20 | version: 1, 21 | ); 22 | } 23 | 24 | static Future insert(String table, Map data) async { 25 | final db = await DatabaseHelper.database(); 26 | await db.insert( 27 | table, 28 | data, 29 | conflictAlgorithm: sql.ConflictAlgorithm.replace, 30 | ); 31 | } 32 | 33 | static Future>> getData(String table) async { 34 | final db = await DatabaseHelper.database(); 35 | return db.query(table); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_2/moove_analogic.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MooveAnalogic extends StatefulWidget { 4 | MooveAnalogic({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _MooveAnalogicState(); 8 | } 9 | 10 | class _MooveAnalogicState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | double controlHeight = MediaQuery.of(context).size.height * 0.9; 14 | double controlWidth = 300; 15 | return Container( 16 | child: Center( 17 | child: Column( 18 | mainAxisAlignment: MainAxisAlignment.center, 19 | children: [ 20 | GestureDetector( 21 | child: Listener( 22 | onPointerMove: (details) { 23 | print(details.localPosition); 24 | }, 25 | child: Container( 26 | decoration: const BoxDecoration( 27 | color: Colors.blueGrey, shape: BoxShape.circle), 28 | height: controlHeight, 29 | width: controlWidth, 30 | ), 31 | ), 32 | ) 33 | ], 34 | ), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /controlador/infra/controllers/keyboardFunctions.py: -------------------------------------------------------------------------------- 1 | from starlette.requests import Request 2 | from starlette.responses import JSONResponse 3 | 4 | from pynput.keyboard import Key 5 | from pynput.keyboard import Controller as keyBoard 6 | 7 | keyboard = keyBoard() 8 | 9 | from infra.server import * 10 | 11 | #KEYBOARD FUNCTIONS 12 | 13 | # @app.post('/backspace') 14 | async def backspace(request: Request): 15 | 16 | keyboard.press(Key.backspace) 17 | return JSONResponse({"response": "succsess"}) 18 | # @app.post('/enter') 19 | async def enter(request: Request): 20 | keyboard.press(Key.enter) 21 | return JSONResponse({"response": "succsess"}) 22 | 23 | # @app.post('/pressandunpresskey') 24 | async def pressAndUnpressKey(request: Request): 25 | data = await request.json() 26 | keyboard.press(data["keyPressed"]) 27 | keyboard.release(data["keyPressed"]) 28 | return JSONResponse({"response": "succsess"}) 29 | # @app.post('/presskey') 30 | async def pressKey(request: Request): 31 | data = await request.json() 32 | keyboard.press(data["keyPressed"]) 33 | return JSONResponse({"response": "succsess"}) 34 | # @app.post('/unpresskey') 35 | async def unPressKey(request: Request): 36 | data = await request.json() 37 | keyboard.release(data["keyPressed"]) 38 | return JSONResponse({"response": "succsess"}) -------------------------------------------------------------------------------- /controlador/infra/controllers/mouseFunctions.py: -------------------------------------------------------------------------------- 1 | from urllib.request import Request 2 | from starlette.responses import JSONResponse 3 | from pynput.mouse import Button, Controller 4 | mouse = Controller() 5 | 6 | 7 | from infra.server import * 8 | #MOUSE FUNCTIONS 9 | #@app.post('/mouseclick') 10 | 11 | def mouseClick(request : Request): 12 | mouse.click(Button.left) 13 | return JSONResponse({"response": "succsess"}) 14 | 15 | #@app.post('/pressright') 16 | def pressRightButton(request : Request): 17 | mouse.press(Button.right) 18 | return JSONResponse({"response": "succsess"}) 19 | #@app.post('/unpressright') 20 | def unPressRightButton(request : Request): 21 | mouse.release(Button.right) 22 | return JSONResponse({"response": "succsess"}) 23 | #@app.post('/pressleft') 24 | def pressLeftButton(request : Request): 25 | mouse.press(Button.left) 26 | return JSONResponse({"response": "succsess"}) 27 | #@app.post('/unpressleft') 28 | def unPressLeftButton(request : Request): 29 | mouse.release(Button.left) 30 | return JSONResponse({"response": "succsess"}) 31 | #@app.post('/moovemouse') 32 | async def mooveMouse(request : Request): 33 | data = await request.json() 34 | mouse.move(data["mooveAxisX"], data["mooveAxisY"]) 35 | return JSONResponse({"response": "succsess"}) 36 | #@app.post('/mousescroll') 37 | async def mouseScrool(request : Request): 38 | data = await request.json() 39 | mouse.scroll(0, data["moove"]) 40 | return JSONResponse({"response": "succsess"}) -------------------------------------------------------------------------------- /controle/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/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 | controle 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 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_1/circle_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/infra/control_requests.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Column circleButtonsArea() { 5 | return Column(mainAxisAlignment: MainAxisAlignment.center, children: [ 6 | Row( 7 | mainAxisAlignment: MainAxisAlignment.center, 8 | children: [ 9 | CircleButton(Colors.blue, "q"), 10 | ], 11 | ), 12 | Row( 13 | mainAxisAlignment: MainAxisAlignment.center, 14 | children: [ 15 | CircleButton(Colors.red, "e"), 16 | SizedBox( 17 | height: 70, 18 | width: 70, 19 | ), 20 | CircleButton(Colors.green, "r"), 21 | ], 22 | ), 23 | Row( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | CircleButton(Colors.yellow, "f"), 27 | ], 28 | ) 29 | ]); 30 | } 31 | 32 | class CircleButton extends StatelessWidget { 33 | CircleButton(Color this.buttonColor, String this.pressedKey); 34 | Color buttonColor; 35 | String pressedKey; 36 | @override 37 | Widget build(BuildContext context) { 38 | return GestureDetector( 39 | onTapDown: (details) { 40 | ControlRequests().sendComand('\presskey', {"keyPressed": pressedKey}); 41 | }, 42 | onTapUp: (details) { 43 | ControlRequests().sendComand('unpresskey', {"keyPressed": pressedKey}); 44 | }, 45 | onTapCancel: () { 46 | ControlRequests().sendComand('unpresskey', {"keyPressed": pressedKey}); 47 | }, 48 | child: Container( 49 | decoration: BoxDecoration(shape: BoxShape.circle, color: buttonColor), 50 | height: 80, 51 | width: 80, 52 | child: Center( 53 | child: Text( 54 | pressedKey.toUpperCase(), 55 | style: TextStyle(fontSize: 30, color: Colors.white), 56 | textAlign: TextAlign.center, 57 | ), 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_2/circle_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/infra/control_requests.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Column circleButtonsArea() { 5 | return Column(mainAxisAlignment: MainAxisAlignment.center, children: [ 6 | Row( 7 | mainAxisAlignment: MainAxisAlignment.center, 8 | children: [ 9 | CircleButton(Colors.blue, "q"), 10 | ], 11 | ), 12 | Row( 13 | mainAxisAlignment: MainAxisAlignment.center, 14 | children: [ 15 | CircleButton(Colors.red, "e"), 16 | SizedBox( 17 | height: 70, 18 | width: 70, 19 | ), 20 | CircleButton(Colors.green, "r"), 21 | ], 22 | ), 23 | Row( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | CircleButton(Colors.yellow, "f"), 27 | ], 28 | ) 29 | ]); 30 | } 31 | 32 | class CircleButton extends StatelessWidget { 33 | CircleButton(Color this.buttonColor, String this.pressedKey); 34 | Color buttonColor; 35 | String pressedKey; 36 | @override 37 | Widget build(BuildContext context) { 38 | return GestureDetector( 39 | onTapDown: (details) { 40 | ControlRequests().sendComand('\presskey', {"keyPressed": pressedKey}); 41 | }, 42 | onTapUp: (details) { 43 | ControlRequests().sendComand('unpresskey', {"keyPressed": pressedKey}); 44 | }, 45 | onTapCancel: () { 46 | ControlRequests().sendComand('unpresskey', {"keyPressed": pressedKey}); 47 | }, 48 | child: Container( 49 | decoration: BoxDecoration(shape: BoxShape.circle, color: buttonColor), 50 | height: 80, 51 | width: 80, 52 | child: Center( 53 | child: Text( 54 | pressedKey.toUpperCase(), 55 | style: TextStyle(fontSize: 30, color: Colors.white), 56 | textAlign: TextAlign.center, 57 | ), 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_1/arrows_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/infra/control_requests.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Column arrows_buttons() { 5 | return Column( 6 | mainAxisAlignment: MainAxisAlignment.center, 7 | crossAxisAlignment: CrossAxisAlignment.start, 8 | children: [ 9 | Row( 10 | children: [ 11 | SizedBox( 12 | height: 70, 13 | width: 70, 14 | ), 15 | RotatedBox(quarterTurns: 1, child: ArrowButton("w")), 16 | ], 17 | ), 18 | Row( 19 | children: [ 20 | RotatedBox(quarterTurns: 0, child: ArrowButton("a")), 21 | Container( 22 | height: 70, 23 | width: 70, 24 | color: Colors.blue, 25 | ), 26 | RotatedBox(quarterTurns: 2, child: ArrowButton("d")), 27 | ], 28 | ), 29 | Row( 30 | children: [ 31 | SizedBox( 32 | height: 70, 33 | width: 70, 34 | ), 35 | RotatedBox(quarterTurns: 3, child: ArrowButton("s")), 36 | ], 37 | ), 38 | ], 39 | ); 40 | } 41 | 42 | class ArrowButton extends StatelessWidget { 43 | ArrowButton(String this.pressedKey); 44 | String pressedKey; 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return GestureDetector( 49 | onTapDown: (details) { 50 | ControlRequests().sendComand('\presskey', {"keyPressed": pressedKey}); 51 | }, 52 | onTapUp: (details) { 53 | ControlRequests() 54 | .sendComand('unpresskey', {"keyPressed": pressedKey}); 55 | }, 56 | onTapCancel: () { 57 | ControlRequests() 58 | .sendComand('unpresskey', {"keyPressed": pressedKey}); 59 | }, 60 | child: Container( 61 | height: 70, 62 | width: 70, 63 | decoration: BoxDecoration( 64 | color: Colors.blue, 65 | borderRadius: BorderRadius.only( 66 | topLeft: Radius.circular(15), bottomLeft: Radius.circular(15)), 67 | ), 68 | )); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_2/arrows_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/infra/control_requests.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Column arrows_buttons() { 5 | return Column( 6 | mainAxisAlignment: MainAxisAlignment.center, 7 | crossAxisAlignment: CrossAxisAlignment.start, 8 | children: [ 9 | Row( 10 | children: [ 11 | SizedBox( 12 | height: 70, 13 | width: 70, 14 | ), 15 | RotatedBox(quarterTurns: 1, child: ArrowButton("w")), 16 | ], 17 | ), 18 | Row( 19 | children: [ 20 | RotatedBox(quarterTurns: 0, child: ArrowButton("a")), 21 | Container( 22 | height: 70, 23 | width: 70, 24 | color: Colors.blue, 25 | ), 26 | RotatedBox(quarterTurns: 2, child: ArrowButton("d")), 27 | ], 28 | ), 29 | Row( 30 | children: [ 31 | SizedBox( 32 | height: 70, 33 | width: 70, 34 | ), 35 | RotatedBox(quarterTurns: 3, child: ArrowButton("s")), 36 | ], 37 | ), 38 | ], 39 | ); 40 | } 41 | 42 | class ArrowButton extends StatelessWidget { 43 | ArrowButton(String this.pressedKey); 44 | String pressedKey; 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return GestureDetector( 49 | onTapDown: (details) { 50 | ControlRequests().sendComand('\presskey', {"keyPressed": pressedKey}); 51 | }, 52 | onTapUp: (details) { 53 | ControlRequests() 54 | .sendComand('unpresskey', {"keyPressed": pressedKey}); 55 | }, 56 | onTapCancel: () { 57 | ControlRequests() 58 | .sendComand('unpresskey', {"keyPressed": pressedKey}); 59 | }, 60 | child: Container( 61 | height: 70, 62 | width: 70, 63 | decoration: BoxDecoration( 64 | color: Colors.blue, 65 | borderRadius: BorderRadius.only( 66 | topLeft: Radius.circular(15), bottomLeft: Radius.circular(15)), 67 | ), 68 | )); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /controle/lib/models/settings.dart: -------------------------------------------------------------------------------- 1 | class Settings { 2 | Settings( 3 | this.mouseSensitivity, 4 | this.scrollSensitivity, 5 | this.leftButtonKey, 6 | this.rightButtonKey, 7 | this.downButtonKey, 8 | this.upButtonKey, 9 | this.startButtonKey, 10 | this.selectButtonKey, 11 | this.upCircleButtonKey, 12 | this.leftCircleButtonKey, 13 | this.rightCircleButtonKey, 14 | this.downCircleButtonKey, 15 | ); 16 | double mouseSensitivity; 17 | double scrollSensitivity; 18 | String leftButtonKey; 19 | String rightButtonKey; 20 | String downButtonKey; 21 | String upButtonKey; 22 | String startButtonKey; 23 | String selectButtonKey; 24 | String upCircleButtonKey; 25 | String leftCircleButtonKey; 26 | String rightCircleButtonKey; 27 | String downCircleButtonKey; 28 | 29 | Map toMap() { 30 | var map = { 31 | 'mouseSensitivity': mouseSensitivity, 32 | 'scrollSensitivity': scrollSensitivity, 33 | 'leftButtonKey': leftButtonKey, 34 | 'rightButtonKey': rightButtonKey, 35 | 'downButtonKey': downButtonKey, 36 | 'upButtonKey': upButtonKey, 37 | 'startButtonKey': startButtonKey, 38 | 'selectButtonKey': selectButtonKey, 39 | 'upCircleButtonKey': upCircleButtonKey, 40 | 'leftCircleButtonKey': leftCircleButtonKey, 41 | 'rightCircleButtonKey': rightCircleButtonKey, 42 | 'downCircleButtonKey': downCircleButtonKey, 43 | }; 44 | return map; 45 | } 46 | 47 | fromMap(Map map) { 48 | mouseSensitivity = map['mouseSensitivity']; 49 | scrollSensitivity = map['scrollSensitivity']; 50 | leftButtonKey = map['leftButtonKey']; 51 | rightButtonKey = map['rightButtonKey']; 52 | downButtonKey = map['downButtonKey']; 53 | upButtonKey = map['upButtonKey']; 54 | startButtonKey = map['startButtonKey']; 55 | selectButtonKey = map['selectButtonKey']; 56 | upCircleButtonKey = map['upCircleButtonKey']; 57 | leftCircleButtonKey = map['leftCircleButtonKey']; 58 | rightCircleButtonKey = map['rightButtonKey']; 59 | downCircleButtonKey = map['downCircleButtonKey']; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_1/middles_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/infra/control_requests.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Column middleButtons(context) { 5 | return Column( 6 | mainAxisAlignment: MainAxisAlignment.center, 7 | children: [ 8 | Row( 9 | mainAxisAlignment: MainAxisAlignment.spaceAround, 10 | children: [ 11 | GestureDetector( 12 | onTap: () { 13 | ControlRequests() 14 | .sendComand('pressandunpresskey', {"keyPressed": "o"}); 15 | }, 16 | child: Container( 17 | height: 30, 18 | width: 90, 19 | decoration: BoxDecoration( 20 | borderRadius: BorderRadius.circular(10), 21 | color: Colors.purple, 22 | ), 23 | child: Padding( 24 | padding: const EdgeInsets.all(8.0), 25 | child: const Text( 26 | "SELECT", 27 | textAlign: TextAlign.center, 28 | style: TextStyle( 29 | color: Colors.white, fontWeight: FontWeight.bold), 30 | ), 31 | ), 32 | ), 33 | ), 34 | GestureDetector( 35 | onTap: () { 36 | ControlRequests() 37 | .sendComand('pressandunpresskey', {"keyPressed": "p"}); 38 | }, 39 | child: Container( 40 | decoration: BoxDecoration( 41 | borderRadius: BorderRadius.circular(10), 42 | color: Colors.purple, 43 | ), 44 | height: 30, 45 | width: 90, 46 | child: Padding( 47 | padding: const EdgeInsets.all(8.0), 48 | child: const Text( 49 | "START", 50 | textAlign: TextAlign.center, 51 | style: TextStyle( 52 | color: Colors.white, fontWeight: FontWeight.bold), 53 | ), 54 | ), 55 | ), 56 | ) 57 | ], 58 | ), 59 | ], 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /controle/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 30 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.controle" 47 | minSdkVersion 16 48 | targetSdkVersion 30 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | multiDexEnabled true 52 | } 53 | 54 | buildTypes { 55 | release { 56 | // TODO: Add your own signing config for the release build. 57 | // Signing with the debug keys for now, so `flutter run --release` works. 58 | signingConfig signingConfigs.debug 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies { 68 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 69 | implementation 'com.android.support:multidex:1.0.3' 70 | } 71 | -------------------------------------------------------------------------------- /controle/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_2/mouse_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:math'; 3 | import 'package:controle/infra/control_requests.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | 7 | class Analogico extends StatefulWidget { 8 | Analogico({Key? key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _AnalogicoState(); 12 | } 13 | 14 | class _AnalogicoState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | double controlHeight = MediaQuery.of(context).size.height * 0.9; 18 | 19 | double controlWidth = 300; 20 | void mooveMouse(double axisXmoove, double axisYmoove) async { 21 | await http.post(Uri.parse('http://192.168.5.192:8000/moovemouse'), 22 | headers: { 23 | 'Content-Type': 'application/json; charset=UTF-8', 24 | }, 25 | body: jsonEncode({ 26 | "mooveAxisX": axisXmoove * 3, 27 | "mooveAxisY": axisYmoove * 3 28 | })); 29 | } 30 | 31 | return Container( 32 | child: Center( 33 | child: Column( 34 | mainAxisAlignment: MainAxisAlignment.center, 35 | children: [ 36 | GestureDetector( 37 | child: Listener( 38 | onPointerMove: (details) { 39 | if (sqrt(((details.localPosition.dx - controlWidth / 2) * 40 | (details.localPosition.dx - controlWidth / 2)) + 41 | ((details.localPosition.dy - controlWidth / 2) * 42 | (details.localPosition.dy - controlWidth / 2))) < 43 | 150) { 44 | mooveMouse(details.localDelta.dx, details.localDelta.dy); 45 | } 46 | }, 47 | child: Container( 48 | decoration: const BoxDecoration( 49 | color: Colors.blue, 50 | borderRadius: BorderRadius.only( 51 | topLeft: Radius.circular(200), 52 | bottomLeft: Radius.circular(200))), 53 | height: controlHeight, 54 | width: controlWidth, 55 | ), 56 | ), 57 | ) 58 | ], 59 | ), 60 | ), 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/lib/ui/pages/joystick/joystick.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/ui/components/joystick_1/arrows_buttons.dart'; 2 | import 'package:controle/ui/components/joystick_1/circle_buttons.dart'; 3 | import 'package:controle/ui/components/joystick_1/middles_buttons.dart'; 4 | import 'package:controle/ui/pages/init/init_page.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:http/http.dart' as http; 9 | import 'dart:async'; 10 | 11 | class JoysTick extends StatefulWidget { 12 | const JoysTick({Key? key}) : super(key: key); 13 | 14 | @override 15 | _JoysTickState createState() => _JoysTickState(); 16 | } 17 | 18 | class _JoysTickState extends State { 19 | @override 20 | void initState() { 21 | super.initState(); 22 | } 23 | 24 | @override 25 | void dispose() { 26 | super.dispose(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | void _returnInit(BuildContext context) { 32 | Navigator.of(context).push(MaterialPageRoute(builder: (context) { 33 | return InitPage(); 34 | })); 35 | } 36 | 37 | bool isLandscape = 38 | MediaQuery.of(context).orientation == Orientation.landscape; 39 | return Scaffold( 40 | appBar: AppBar( 41 | toolbarHeight: !isLandscape ? 50 : 0, 42 | actions: [ 43 | IconButton( 44 | onPressed: () { 45 | _returnInit(context); 46 | }, 47 | icon: Icon(Icons.home)) 48 | ], 49 | ), 50 | body: Container( 51 | color: Colors.white, 52 | child: !isLandscape 53 | ? Column( 54 | mainAxisAlignment: MainAxisAlignment.center, 55 | crossAxisAlignment: CrossAxisAlignment.center, 56 | children: const [ 57 | Text( 58 | "Vire o dispositivo para entrar no modo gamer", 59 | textAlign: TextAlign.center, 60 | style: TextStyle(fontSize: 24), 61 | ), 62 | ], 63 | ) 64 | : Padding( 65 | padding: const EdgeInsets.all(24.0), 66 | child: Row( 67 | children: [ 68 | Flexible( 69 | flex: 2, 70 | fit: FlexFit.tight, 71 | child: arrows_buttons(), 72 | ), 73 | Flexible( 74 | flex: 2, 75 | fit: FlexFit.tight, 76 | child: middleButtons(context)), 77 | Flexible( 78 | flex: 2, 79 | fit: FlexFit.tight, 80 | child: circleButtonsArea(), 81 | ), 82 | ], 83 | ), 84 | ), 85 | ), 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/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 | -------------------------------------------------------------------------------- /controle/lib/ui/components/joystick_2/teste_analogico_.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:math'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:http/http.dart' as http; 5 | 6 | class Analogico extends StatefulWidget { 7 | Analogico({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _AnalogicoState(); 11 | } 12 | 13 | class _AnalogicoState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | bool usingAnalogic = false; 17 | double axisX = 0.0; 18 | double deltaX = 0; 19 | double deltaY = 0; 20 | double axisY = 0.0; 21 | void mooveMouse() async { 22 | bool axisXnull = false; 23 | 24 | int countX = 0; 25 | int countY = 0; 26 | 27 | double deslocationX = axisX / axisX; 28 | double deslocationY = axisX / axisY; 29 | 30 | while (usingAnalogic) { 31 | await http.post(Uri.parse('http://192.168.5.192:8000/moovejoystick'), 32 | headers: { 33 | 'Content-Type': 'application/json; charset=UTF-8', 34 | }, 35 | body: jsonEncode( 36 | {"mooveAxisX": axisX, "mooveAxisY": axisY})); 37 | 38 | await Future.delayed(Duration(milliseconds: 5)); 39 | } 40 | } 41 | 42 | return Container( 43 | child: Center( 44 | child: Column( 45 | mainAxisAlignment: MainAxisAlignment.center, 46 | children: [ 47 | Listener( 48 | onPointerMove: (details) { 49 | if (sqrt(((details.localPosition.dx - 150) * 50 | (details.localPosition.dx - 150)) + 51 | ((details.localPosition.dy - 150) * 52 | (details.localPosition.dy - 150))) < 53 | 150) { 54 | axisX = (details.localPosition.dx - 150) / 3; 55 | axisY = (details.localPosition.dy - 150) / 3; 56 | print(sqrt(((details.localPosition.dx - 150) * 57 | (details.localPosition.dx - 150)) + 58 | ((details.localPosition.dy - 150) * 59 | (details.localPosition.dy - 150)))); 60 | } 61 | }, 62 | onPointerDown: (details) { 63 | usingAnalogic = true; 64 | if (details.localPosition.dx > 100 && 65 | details.localPosition.dx < 200 && 66 | details.localPosition.dy > 100 && 67 | details.localPosition.dy < 200) mooveMouse(); 68 | }, 69 | onPointerUp: (event) { 70 | axisX = 0.0; 71 | axisY = 0.0; 72 | usingAnalogic = false; 73 | }, 74 | child: Stack(children: [ 75 | Container( 76 | decoration: 77 | BoxDecoration(shape: BoxShape.circle, color: Colors.red), 78 | height: 300, 79 | width: 300, 80 | ), 81 | Positioned( 82 | top: 100, 83 | left: 100, 84 | child: Draggable( 85 | child: Container( 86 | height: 100, 87 | width: 100, 88 | decoration: BoxDecoration( 89 | shape: BoxShape.circle, color: Colors.blue), 90 | ), 91 | feedback: Container( 92 | height: 100, 93 | width: 100, 94 | decoration: BoxDecoration( 95 | shape: BoxShape.circle, color: Colors.blue), 96 | ), 97 | ), 98 | ), 99 | ]), 100 | ) 101 | ], 102 | ), 103 | ), 104 | ); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /controle/lib/ui/pages/steering/steering.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:controle/infra/control_requests.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'package:sensors_plus/sensors_plus.dart'; 7 | 8 | class Steering extends StatefulWidget { 9 | const Steering({Key? key}) : super(key: key); 10 | 11 | @override 12 | State createState() => _SteeringState(); 13 | } 14 | 15 | class _SteeringState extends State { 16 | bool inThisPage = false; 17 | @override 18 | void initState() { 19 | SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); 20 | inThisPage = true; 21 | double dy = 1000; 22 | double variationValue = 100; 23 | int delay = 0; 24 | StreamSubscription subscription = 25 | gyroscopeEvents.listen((GyroscopeEvent event) async { 26 | dy += event.z * 100; 27 | delay += (event.z * 100).round(); 28 | // print(dy); 29 | 30 | if (dy > (1300)) { 31 | ControlRequests().sendComand('presskey', {"keyPressed": "a"}); 32 | } else if (dy > (1000 + variationValue)) { 33 | ControlRequests().sendComand('unpresskey', {"keyPressed": "d"}); 34 | ControlRequests().sendComand('presskey', {"keyPressed": "a"}); 35 | await Future.delayed(Duration(milliseconds: ((delay).abs()))); 36 | ControlRequests().sendComand('unpresskey', {"keyPressed": "a"}); 37 | await Future.delayed(Duration(milliseconds: (1000 - (delay).abs()))); 38 | } else { 39 | ControlRequests().sendComand('unpresskey', {"keyPressed": "a"}); 40 | } 41 | 42 | if (dy < 700) { 43 | ControlRequests().sendComand('presskey', {"keyPressed": "d"}); 44 | } else if (dy < (1000 - variationValue)) { 45 | ControlRequests().sendComand('unpresskey', {"keyPressed": "a"}); 46 | ControlRequests().sendComand('presskey', {"keyPressed": "d"}); 47 | await Future.delayed(Duration(milliseconds: ((delay).abs()))); 48 | ControlRequests().sendComand('unpresskey', {"keyPressed": "d"}); 49 | await Future.delayed(Duration(milliseconds: (1000 - (delay).abs()))); 50 | } else { 51 | ControlRequests().sendComand('unpresskey', {"keyPressed": "d"}); 52 | } 53 | }); 54 | super.initState(); 55 | } 56 | 57 | @override 58 | void dispose() { 59 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 60 | 61 | super.dispose(); 62 | } 63 | 64 | @override 65 | Widget build(BuildContext context) { 66 | return Scaffold( 67 | body: Column( 68 | mainAxisAlignment: MainAxisAlignment.end, 69 | children: [ 70 | Row(), 71 | Row( 72 | mainAxisAlignment: MainAxisAlignment.spaceAround, 73 | children: [ 74 | Listener( 75 | onPointerDown: (_) { 76 | ControlRequests().sendComand("presskey", {"keyPressed": "w"}); 77 | }, 78 | onPointerUp: (_) { 79 | ControlRequests() 80 | .sendComand("unpresskey", {"keyPressed": "w"}); 81 | }, 82 | child: Container( 83 | height: 100, 84 | width: 300, 85 | color: Colors.green, 86 | ), 87 | ), 88 | Listener( 89 | onPointerDown: (_) { 90 | ControlRequests().sendComand("presskey", {"keyPressed": "s"}); 91 | }, 92 | onPointerUp: (_) { 93 | ControlRequests() 94 | .sendComand("unpresskey", {"keyPressed": "s"}); 95 | }, 96 | child: Container( 97 | height: 100, 98 | width: 300, 99 | color: Colors.red, 100 | ), 101 | ), 102 | ], 103 | ), 104 | SizedBox( 105 | height: 40, 106 | ) 107 | ], 108 | ), 109 | ); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /controle/lib/ui/pages/joystick_2/joystick_2.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/ui/components/joystick_2/arrows_buttons.dart'; 2 | import 'package:controle/ui/components/joystick_2/moove_analogic.dart'; 3 | import 'package:controle/ui/components/joystick_2/mouse_controller.dart'; 4 | import 'package:controle/ui/components/joystick_2/circle_buttons.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:http/http.dart' as http; 9 | import 'dart:async'; 10 | 11 | class JoysTick2 extends StatefulWidget { 12 | const JoysTick2({Key? key}) : super(key: key); 13 | 14 | @override 15 | _JoysTick2State createState() => _JoysTick2State(); 16 | } 17 | 18 | class _JoysTick2State extends State { 19 | @override 20 | void initState() { 21 | super.initState(); 22 | } 23 | 24 | @override 25 | void dispose() { 26 | super.dispose(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | bool isLandscape = 32 | MediaQuery.of(context).orientation == Orientation.landscape; 33 | return Scaffold( 34 | appBar: AppBar( 35 | toolbarHeight: !isLandscape ? 50 : 0, 36 | actions: [IconButton(onPressed: () {}, icon: Icon(Icons.settings))], 37 | ), 38 | body: Container( 39 | color: Colors.white, 40 | child: !isLandscape 41 | ? Column( 42 | mainAxisAlignment: MainAxisAlignment.center, 43 | crossAxisAlignment: CrossAxisAlignment.center, 44 | children: const [ 45 | Text( 46 | "Vire o dispositivo para entrar no modo gamer", 47 | textAlign: TextAlign.center, 48 | style: TextStyle(fontSize: 24), 49 | ), 50 | ], 51 | ) 52 | : Padding( 53 | padding: const EdgeInsets.all(0), 54 | child: Row( 55 | children: [ 56 | Flexible( 57 | flex: 1, fit: FlexFit.tight, child: MooveAnalogic()), 58 | Flexible( 59 | flex: 1, 60 | fit: FlexFit.tight, 61 | child: Column( 62 | mainAxisAlignment: MainAxisAlignment.spaceAround, 63 | children: [ 64 | Row( 65 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 66 | children: [ 67 | CircleButton(Colors.red, "e"), 68 | CircleButton(Colors.orange, "e"), 69 | ], 70 | ), 71 | Row( 72 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 73 | children: [ 74 | Padding( 75 | padding: const EdgeInsets.all(20), 76 | child: CircleButton(Colors.grey, "q"), 77 | ), 78 | Padding( 79 | padding: const EdgeInsets.all(20), 80 | child: CircleButton(Colors.green, "q"), 81 | ), 82 | ], 83 | ), 84 | Row( 85 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 86 | children: [ 87 | CircleButton(Colors.indigo, "q"), 88 | CircleButton(Colors.purple, "q"), 89 | ], 90 | ) 91 | ], 92 | ), 93 | ), 94 | Flexible( 95 | flex: 1, 96 | fit: FlexFit.tight, 97 | child: Analogico(), 98 | ), 99 | ], 100 | ), 101 | ), 102 | ), 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /controle/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | controle 30 | 31 | 32 | 33 | 36 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /controle/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: controle 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter 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 specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | http: ^0.13.3 33 | control_pad: ^1.1.1+1 34 | sqflite: ^2.0.2 35 | path_provider: ^2.0.9 36 | flutter_barcode_scanner: ^2.0.0 37 | sensors_plus: 38 | 39 | # The following adds the Cupertino Icons font to your application. 40 | # Use with the CupertinoIcons class for iOS style icons. 41 | cupertino_icons: ^1.0.2 42 | 43 | dev_dependencies: 44 | flutter_test: 45 | sdk: flutter 46 | 47 | 48 | 49 | # The "flutter_lints" package below contains a set of recommended lints to 50 | # encourage good coding practices. The lint set provided by the package is 51 | # activated in the `analysis_options.yaml` file located at the root of your 52 | # package. See that file for information about deactivating specific lint 53 | # rules and activating additional ones. 54 | flutter_lints: ^1.0.0 55 | 56 | # For information on the generic Dart part of this file, see the 57 | # following page: https://dart.dev/tools/pub/pubspec 58 | 59 | # The following section is specific to Flutter. 60 | flutter: 61 | 62 | # The following line ensures that the Material Icons font is 63 | # included with your application, so that you can use the icons in 64 | # the material Icons class. 65 | uses-material-design: true 66 | 67 | # To add assets to your application, add an assets section, like this: 68 | assets: 69 | - assets/images/keyboard-and-mouse.png 70 | - assets/images/settings.png 71 | - assets/images/steering.png 72 | - assets/images/joystick.png 73 | 74 | 75 | # An image asset can refer to one or more resolution-specific "variants", see 76 | # https://flutter.dev/assets-and-images/#resolution-aware. 77 | 78 | # For details regarding adding assets from package dependencies, see 79 | # https://flutter.dev/assets-and-images/#from-packages 80 | 81 | # To add custom fonts to your application, add a fonts section here, 82 | # in this "flutter" section. Each entry in this list should have a 83 | # "family" key with the font family name, and a "fonts" key with a 84 | # list giving the asset and other descriptors for the font. For 85 | # example: 86 | # fonts: 87 | # - family: Schyler 88 | # fonts: 89 | # - asset: fonts/Schyler-Regular.ttf 90 | # - asset: fonts/Schyler-Italic.ttf 91 | # style: italic 92 | # - family: Trajan Pro 93 | # fonts: 94 | # - asset: fonts/TrajanPro.ttf 95 | # - asset: fonts/TrajanPro_Bold.ttf 96 | # weight: 700 97 | # 98 | # For details regarding fonts from package dependencies, 99 | # see https://flutter.dev/custom-fonts/#from-packages 100 | -------------------------------------------------------------------------------- /controle/lib/ui/pages/init/init_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:controle/infra/database_helper.dart'; 2 | import 'package:controle/ui/pages/pages.dart'; 3 | import 'package:controle/ui/pages/steering/steering.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:controle/infra/base_url.dart' as url; 6 | import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart'; 7 | import 'package:sqflite/sqflite.dart'; 8 | 9 | class InitPage extends StatefulWidget { 10 | const InitPage({Key? key}) : super(key: key); 11 | 12 | @override 13 | _InitPageState createState() => _InitPageState(); 14 | } 15 | 16 | class KeyProps { 17 | KeyProps(this.id, this.value, this.key); 18 | String id; 19 | String value; 20 | String key; 21 | } 22 | 23 | class _InitPageState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | List _itens = []; 27 | void loadData() async { 28 | DatabaseHelper.insert( 29 | 'settings', {'id': 3, 'value': 'a', 'key': 'leftArrowButton'}); 30 | final dataList = await DatabaseHelper.getData('settings'); 31 | 32 | _itens = dataList 33 | .map( 34 | (data) => KeyProps(data['id'], data['value'], data['key']), 35 | ) 36 | .toList(); 37 | } 38 | 39 | String joystick = 'assets/images/joystick.png'; 40 | String steering = 'assets/images/steering.png'; 41 | String settings = 'assets/images/settings.png'; 42 | String mouseAndKeyboard = 'assets/images/keyboard-and-mouse.png'; 43 | return Scaffold( 44 | appBar: AppBar( 45 | actions: [ 46 | IconButton( 47 | onPressed: () {}, 48 | icon: Icon(Icons.settings), 49 | ), 50 | ], 51 | ), 52 | body: Container( 53 | color: Colors.white, 54 | child: Column( 55 | mainAxisAlignment: MainAxisAlignment.center, 56 | children: [ 57 | Row( 58 | mainAxisAlignment: MainAxisAlignment.center, 59 | children: [ 60 | OptionCard(mouseAndKeyboard, MousePad()), 61 | const SizedBox( 62 | width: 30, 63 | ), 64 | OptionCard(joystick, JoysTick()), 65 | ], 66 | ), 67 | const SizedBox(height: 30), 68 | // Row( 69 | // mainAxisAlignment: MainAxisAlignment.center, 70 | // children: [ 71 | // OptionCard(steering, Steering()), 72 | // const SizedBox( 73 | // width: 30, 74 | // ), 75 | // OptionCard(settings, Container()), 76 | // ], 77 | // ), 78 | ], 79 | )), 80 | ); 81 | } 82 | } 83 | 84 | class OptionCard extends StatefulWidget { 85 | OptionCard(String this.image, Widget this.page); 86 | Widget page; 87 | String image; 88 | 89 | @override 90 | State createState() => _OptionCardState(); 91 | } 92 | 93 | class _OptionCardState extends State { 94 | @override 95 | Widget build(BuildContext context) { 96 | void _selectPage(BuildContext context, Widget page) { 97 | Navigator.of(context).push(MaterialPageRoute(builder: (context) { 98 | return page; 99 | })); 100 | } 101 | 102 | return GestureDetector( 103 | onTap: () { 104 | if (url.baseUrl != "" && url.baseUrl != "-1") { 105 | _selectPage(context, widget.page); 106 | } else { 107 | showDialog( 108 | context: context, 109 | builder: (_) => AlertDialog( 110 | title: Text("Não sincronizado"), 111 | content: Text( 112 | "Antes de começar a usar, você precisa escanear o qrCode."), 113 | actions: [ 114 | ElevatedButton( 115 | onPressed: () { 116 | Navigator.of(context).pop(); 117 | setState(() async { 118 | url.baseUrl = await FlutterBarcodeScanner.scanBarcode( 119 | "#FFFFFF", "Cancelar", false, ScanMode.QR); 120 | }); 121 | }, 122 | child: Text("Escanear")) 123 | ], 124 | ), 125 | ); 126 | } 127 | }, 128 | child: Card( 129 | elevation: 10, 130 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(22)), 131 | child: Stack( 132 | children: [ 133 | Container( 134 | decoration: BoxDecoration( 135 | borderRadius: BorderRadius.circular(22), color: Colors.blue), 136 | height: 150, 137 | width: 150, 138 | ), 139 | Positioned( 140 | bottom: 25, 141 | left: 25, 142 | child: Image.asset( 143 | widget.image, 144 | height: 100, 145 | width: 100, 146 | ), 147 | ), 148 | ], 149 | ), 150 | ), 151 | ); 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /controle/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.8.1" 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.3.1" 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 | control_pad: 47 | dependency: "direct main" 48 | description: 49 | name: control_pad 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.1+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.4" 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.1.2" 74 | file: 75 | dependency: transitive 76 | description: 77 | name: file 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "6.1.2" 81 | flutter: 82 | dependency: "direct main" 83 | description: flutter 84 | source: sdk 85 | version: "0.0.0" 86 | flutter_barcode_scanner: 87 | dependency: "direct main" 88 | description: 89 | name: flutter_barcode_scanner 90 | url: "https://pub.dartlang.org" 91 | source: hosted 92 | version: "2.0.0" 93 | flutter_lints: 94 | dependency: "direct dev" 95 | description: 96 | name: flutter_lints 97 | url: "https://pub.dartlang.org" 98 | source: hosted 99 | version: "1.0.4" 100 | flutter_plugin_android_lifecycle: 101 | dependency: transitive 102 | description: 103 | name: flutter_plugin_android_lifecycle 104 | url: "https://pub.dartlang.org" 105 | source: hosted 106 | version: "2.0.5" 107 | flutter_test: 108 | dependency: "direct dev" 109 | description: flutter 110 | source: sdk 111 | version: "0.0.0" 112 | flutter_web_plugins: 113 | dependency: transitive 114 | description: flutter 115 | source: sdk 116 | version: "0.0.0" 117 | http: 118 | dependency: "direct main" 119 | description: 120 | name: http 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "0.13.4" 124 | http_parser: 125 | dependency: transitive 126 | description: 127 | name: http_parser 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "4.0.0" 131 | js: 132 | dependency: transitive 133 | description: 134 | name: js 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.6.3" 138 | lints: 139 | dependency: transitive 140 | description: 141 | name: lints 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.0.1" 145 | matcher: 146 | dependency: transitive 147 | description: 148 | name: matcher 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "0.12.10" 152 | meta: 153 | dependency: transitive 154 | description: 155 | name: meta 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.7.0" 159 | path: 160 | dependency: transitive 161 | description: 162 | name: path 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.8.0" 166 | path_provider: 167 | dependency: "direct main" 168 | description: 169 | name: path_provider 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "2.0.9" 173 | path_provider_android: 174 | dependency: transitive 175 | description: 176 | name: path_provider_android 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "2.0.11" 180 | path_provider_ios: 181 | dependency: transitive 182 | description: 183 | name: path_provider_ios 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.0.7" 187 | path_provider_linux: 188 | dependency: transitive 189 | description: 190 | name: path_provider_linux 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "2.1.5" 194 | path_provider_macos: 195 | dependency: transitive 196 | description: 197 | name: path_provider_macos 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "2.0.5" 201 | path_provider_platform_interface: 202 | dependency: transitive 203 | description: 204 | name: path_provider_platform_interface 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.3" 208 | path_provider_windows: 209 | dependency: transitive 210 | description: 211 | name: path_provider_windows 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "2.0.5" 215 | platform: 216 | dependency: transitive 217 | description: 218 | name: platform 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "3.1.0" 222 | plugin_platform_interface: 223 | dependency: transitive 224 | description: 225 | name: plugin_platform_interface 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "2.1.2" 229 | process: 230 | dependency: transitive 231 | description: 232 | name: process 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "4.2.4" 236 | sensors_plus: 237 | dependency: "direct main" 238 | description: 239 | name: sensors_plus 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.2.2" 243 | sensors_plus_platform_interface: 244 | dependency: transitive 245 | description: 246 | name: sensors_plus_platform_interface 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.1.0" 250 | sensors_plus_web: 251 | dependency: transitive 252 | description: 253 | name: sensors_plus_web 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "1.1.0" 257 | sky_engine: 258 | dependency: transitive 259 | description: flutter 260 | source: sdk 261 | version: "0.0.99" 262 | source_span: 263 | dependency: transitive 264 | description: 265 | name: source_span 266 | url: "https://pub.dartlang.org" 267 | source: hosted 268 | version: "1.8.1" 269 | sqflite: 270 | dependency: "direct main" 271 | description: 272 | name: sqflite 273 | url: "https://pub.dartlang.org" 274 | source: hosted 275 | version: "2.0.2" 276 | sqflite_common: 277 | dependency: transitive 278 | description: 279 | name: sqflite_common 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "2.0.1+1" 283 | stack_trace: 284 | dependency: transitive 285 | description: 286 | name: stack_trace 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.10.0" 290 | stream_channel: 291 | dependency: transitive 292 | description: 293 | name: stream_channel 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "2.1.0" 297 | string_scanner: 298 | dependency: transitive 299 | description: 300 | name: string_scanner 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "1.1.0" 304 | synchronized: 305 | dependency: transitive 306 | description: 307 | name: synchronized 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "3.0.0" 311 | term_glyph: 312 | dependency: transitive 313 | description: 314 | name: term_glyph 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "1.2.0" 318 | test_api: 319 | dependency: transitive 320 | description: 321 | name: test_api 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "0.4.2" 325 | typed_data: 326 | dependency: transitive 327 | description: 328 | name: typed_data 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "1.3.0" 332 | vector_math: 333 | dependency: transitive 334 | description: 335 | name: vector_math 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "2.1.0" 339 | win32: 340 | dependency: transitive 341 | description: 342 | name: win32 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "2.3.6" 346 | xdg_directories: 347 | dependency: transitive 348 | description: 349 | name: xdg_directories 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "0.2.0+1" 353 | sdks: 354 | dart: ">=2.14.0 <3.0.0" 355 | flutter: ">=2.5.0" 356 | -------------------------------------------------------------------------------- /controle/lib/ui/pages/touchpad/touchpad.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:controle/infra/control_requests.dart'; 4 | import 'package:controle/ui/pages/init/init_page.dart'; 5 | 6 | import 'package:flutter/material.dart'; 7 | import 'package:http/http.dart' as http; 8 | import 'dart:async'; 9 | 10 | import '../pages.dart'; 11 | 12 | class MousePad extends StatefulWidget { 13 | MousePad({Key? key}) : super(key: key); 14 | 15 | @override 16 | State createState() => _MousePadState(); 17 | } 18 | 19 | class _MousePadState extends State { 20 | bool firstKeyboardTouch = false; 21 | @override 22 | Widget build(BuildContext context) { 23 | void _returnInit(BuildContext context) { 24 | Navigator.of(context).push(MaterialPageRoute(builder: (context) { 25 | return const InitPage(); 26 | })); 27 | } 28 | 29 | bool isLandscape = 30 | MediaQuery.of(context).orientation == Orientation.landscape; 31 | double touchPadWidth = MediaQuery.of(context).size.width * 0.8; 32 | double touchPadHeight = isLandscape 33 | ? MediaQuery.of(context).size.height * 0.6 34 | : MediaQuery.of(context).size.height * 0.7; 35 | double leftButtonWidth = isLandscape 36 | ? MediaQuery.of(context).size.width * 0.400 37 | : MediaQuery.of(context).size.width * 0.375; 38 | double rightButtonWidth = isLandscape 39 | ? MediaQuery.of(context).size.width * 0.400 40 | : MediaQuery.of(context).size.width * 0.375; 41 | ; 42 | double leftButtonHeight = isLandscape 43 | ? MediaQuery.of(context).size.height * 0.100 44 | : MediaQuery.of(context).size.height * 0.08; 45 | double rightButtonHeight = isLandscape 46 | ? MediaQuery.of(context).size.height * 0.100 47 | : MediaQuery.of(context).size.height * 0.08; 48 | double scrollAreaHeight = isLandscape 49 | ? MediaQuery.of(context).size.height * 0.6 50 | : MediaQuery.of(context).size.height * 0.7; 51 | double scrollAreaWidth = MediaQuery.of(context).size.width * 0.1; 52 | 53 | String initialValueText = ""; 54 | for (int i = 0; i < 1000; i++) { 55 | initialValueText = initialValueText + " "; 56 | } 57 | String keyboardValue = initialValueText; 58 | String previousKeyboardValue = initialValueText; 59 | TextEditingController controllerText = TextEditingController() 60 | ..text = initialValueText; 61 | controllerText.selection = TextSelection.fromPosition( 62 | TextPosition(offset: controllerText.text.length)); 63 | FocusNode keyBoardFocus = FocusNode(); 64 | return Scaffold( 65 | resizeToAvoidBottomInset: false, 66 | appBar: AppBar( 67 | actions: [ 68 | IconButton( 69 | onPressed: () { 70 | _returnInit(context); 71 | }, 72 | icon: Icon(Icons.home), 73 | ), 74 | ], 75 | ), 76 | body: Container( 77 | color: Colors.white, 78 | child: Row( 79 | mainAxisAlignment: MainAxisAlignment.center, 80 | children: [ 81 | Column( 82 | mainAxisAlignment: MainAxisAlignment.center, 83 | children: [ 84 | Row( 85 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 86 | children: [ 87 | GestureDetector( 88 | onTap: () { 89 | ControlRequests().sendComand('mouseclick', null); 90 | }, 91 | child: Listener( 92 | onPointerMove: (details) { 93 | setState(() { 94 | if (details.localPosition.dx > 0 && 95 | details.localPosition.dy > 0 && 96 | details.localPosition.dy < (touchPadHeight) && 97 | details.localPosition.dx < (touchPadWidth)) { 98 | ControlRequests().sendComand('moovemouse', { 99 | "mooveAxisX": details.delta.dx, 100 | "mooveAxisY": details.delta.dy 101 | }); 102 | } 103 | }); 104 | }, 105 | child: Container( 106 | decoration: BoxDecoration( 107 | color: Colors.blue, 108 | border: Border.all( 109 | color: Color(0xFF00417A), 110 | width: 3, 111 | ), 112 | borderRadius: BorderRadius.circular(10), 113 | ), 114 | height: touchPadHeight, 115 | width: touchPadWidth, 116 | ), 117 | ), 118 | ), 119 | SizedBox( 120 | width: MediaQuery.of(context).size.width * 0.02, 121 | ), 122 | // Listenner que simula o scrool de um touchpad 123 | Listener( 124 | onPointerMove: (details) { 125 | setState(() { 126 | //Evitando que a função de mover o scroll seja ativada fora da area do scroll 127 | if (details.localPosition.dx > 0 && 128 | details.localPosition.dy > 0 && 129 | details.localPosition.dy < (scrollAreaHeight) && 130 | details.localPosition.dx < (scrollAreaWidth)) { 131 | ControlRequests().sendComand('mousescroll', 132 | {"moove": details.delta.dx - details.delta.dy}); 133 | } 134 | }); 135 | }, 136 | child: GestureDetector( 137 | child: Container( 138 | decoration: BoxDecoration( 139 | color: Colors.blue, 140 | border: Border.all( 141 | color: Color(0xFF00417A), 142 | width: 3, 143 | ), 144 | borderRadius: BorderRadius.circular(10), 145 | ), 146 | height: scrollAreaHeight, 147 | width: scrollAreaWidth, 148 | ), 149 | ), 150 | ), 151 | ], 152 | ), 153 | const SizedBox( 154 | height: 5, 155 | ), 156 | Row( 157 | children: [ 158 | GestureDetector( 159 | onTapDown: (_) { 160 | ControlRequests().sendComand('pressleft', null); 161 | }, 162 | onTapUp: (_) { 163 | ControlRequests().sendComand('unpressleft', null); 164 | }, 165 | onPanCancel: () { 166 | ControlRequests().sendComand('unpressleft', null); 167 | }, 168 | child: Container( 169 | decoration: BoxDecoration( 170 | color: Colors.blue, 171 | border: Border.all( 172 | color: Color(0xFF00417A), 173 | width: 3, 174 | ), 175 | borderRadius: BorderRadius.circular(10), 176 | ), 177 | height: leftButtonHeight, 178 | width: rightButtonWidth, 179 | ), 180 | ), 181 | Container( 182 | decoration: BoxDecoration( 183 | color: Colors.blue, 184 | border: Border.all( 185 | color: Color(0xFF00417A), 186 | width: 3, 187 | ), 188 | borderRadius: BorderRadius.circular(10), 189 | ), 190 | height: leftButtonHeight, 191 | width: MediaQuery.of(context).size.width * 0.150, 192 | child: IconButton( 193 | color: Colors.white, 194 | onPressed: () { 195 | if (keyBoardFocus.hasFocus) { 196 | keyBoardFocus.unfocus(); 197 | keyBoardFocus.requestFocus(); 198 | } else 199 | keyBoardFocus.requestFocus(); 200 | }, 201 | icon: Icon(Icons.keyboard)), 202 | ), 203 | GestureDetector( 204 | onTapDown: (_) { 205 | ControlRequests().sendComand('pressright', null); 206 | }, 207 | onTapUp: (_) { 208 | ControlRequests().sendComand('unpressright', null); 209 | }, 210 | onTapCancel: () { 211 | ControlRequests().sendComand('unpressright', null); 212 | }, 213 | child: Container( 214 | decoration: BoxDecoration( 215 | color: Colors.blue, 216 | border: Border.all( 217 | color: Color(0xFF00417A), 218 | width: 3, 219 | ), 220 | borderRadius: BorderRadius.circular(10), 221 | ), 222 | height: rightButtonHeight, 223 | width: leftButtonWidth, 224 | ), 225 | ), 226 | ], 227 | ), 228 | Container( 229 | height: 1, 230 | width: 1, 231 | child: Stack(children: [ 232 | Container( 233 | width: MediaQuery.of(context).size.width, 234 | color: Colors.white, 235 | height: MediaQuery.of(context).size.height, 236 | ), 237 | Container( 238 | width: MediaQuery.of(context).size.width, 239 | child: Visibility( 240 | visible: true, 241 | child: TextField( 242 | focusNode: keyBoardFocus, 243 | controller: controllerText, 244 | onChanged: (value) { 245 | setState(() { 246 | if (previousKeyboardValue.length > value.length) { 247 | ControlRequests().sendComand('backspace', null); 248 | } else { 249 | ControlRequests().sendComand( 250 | 'pressandunpresskey', 251 | {"keyPressed": value[value.length - 1]}, 252 | ); 253 | } 254 | }); 255 | }, 256 | onSubmitted: (_) { 257 | ControlRequests().sendComand('enter', null); 258 | }, 259 | ), 260 | ), 261 | ), 262 | ]), 263 | ), 264 | ], 265 | ), 266 | ], 267 | ), 268 | ), 269 | ); 270 | } 271 | } 272 | -------------------------------------------------------------------------------- /controle/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 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.controle; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.controle; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.controle; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | --------------------------------------------------------------------------------