{"id":30891182,"url":"https://github.com/paulocoutinhox/flutter-gadget","last_synced_at":"2026-04-08T18:02:19.589Z","repository":{"id":311677967,"uuid":"1044559629","full_name":"paulocoutinhox/flutter-gadget","owner":"paulocoutinhox","description":"Flutter Gadget — Hardware Buttons for Your Flutter Workflow 🚀","archived":false,"fork":false,"pushed_at":"2025-08-25T22:07:19.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T21:52:13.564Z","etag":null,"topics":["arduino","eletronic","esp32","flutter","gadget","usb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulocoutinhox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-25T21:51:57.000Z","updated_at":"2025-08-25T22:15:57.000Z","dependencies_parsed_at":"2025-08-26T00:09:43.983Z","dependency_job_id":"5aca4275-b6a5-4374-995f-23272be13d23","html_url":"https://github.com/paulocoutinhox/flutter-gadget","commit_stats":null,"previous_names":["paulocoutinhox/flutter-gadget"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paulocoutinhox/flutter-gadget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fflutter-gadget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fflutter-gadget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fflutter-gadget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fflutter-gadget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulocoutinhox","download_url":"https://codeload.github.com/paulocoutinhox/flutter-gadget/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fflutter-gadget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","eletronic","esp32","flutter","gadget","usb"],"created_at":"2025-09-08T18:03:52.968Z","updated_at":"2026-04-08T18:02:19.573Z","avatar_url":"https://github.com/paulocoutinhox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Gadget — Hardware Buttons for Your Flutter Workflow 🚀\n\nTired of typing `flutter clean`, `flutter pub get`, or `flutter upgrade` every time?\nWith this little **ESP32/Arduino gadget**, you can map **physical buttons** to your Flutter commands.\nPress a button on the device → the command runs instantly on your computer. ⚡\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"extras/images/flutter-gadget.jpg\" width=\"300\" alt=\"Flutter Gadget\"\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Features\n- 🖱️ **Physical buttons** trigger Flutter commands\n- 🖥️ **Cross-platform Python daemon** (macOS, Linux, Windows)\n- 🔌 **Auto-detects serial port**\n- ✅ **Token validation** (only recognized commands are executed)\n- 🔧 Built with **Arduino IDE / ESP32** firmware + **Python script**\n\n---\n\n## 🖼️ Circuit\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"extras/images/circuit.png\" alt=\"Circuit diagram\"\u003e\n\u003c/p\u003e\n\n---\n\n## 📂 Project Structure\n```\nfirmware/\n  esp32_flutter_keys/\n    esp32_flutter_keys.ino # ESP32/Arduino firmware\ndaemon/\n  main.py                  # Python cross-platform daemon\n  requirements.txt         # Python dependencies\n```\n\n---\n\n## ⚙️ How It Works\n\n### 1. ESP32 / Arduino Firmware\n- Written in **C++ (Arduino IDE)**\n- Uses `INPUT_PULLUP` buttons on GPIOs\n- On press, sends a short **token** via Serial:\n  - `CLEAN` → `flutter clean`\n  - `PUBGET` → `flutter pub get`\n  - `UPGRADE` → `flutter upgrade`\n\n👉 Flash the firmware using [Arduino IDE](https://www.arduino.cc/en/software) (choose ESP32 board or Arduino board).\n👉 On the ESP32 C6, recommended pins are **20 / 21 / 22** (safe GPIOs).\n\n👉 Online project on Wokwi:\nhttps://wokwi.com/projects/440295324580074497\n\n---\n\n### 2. Python Daemon\n- Listens on the serial port\n- Validates incoming tokens\n- Executes the matching **Flutter command** in your project directory\n\nRequirements:\n```bash\n# Create and activate virtual environment\npython3 -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Install dependencies\npip install -r daemon/requirements.txt\n```\n\nRun:\n```bash\n# Activate virtual environment\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Set your Flutter project path\nexport FLUTTER_KEYS_PROJECT=\"~/dev/my_flutter_app\"   # your project path\n\n# Run the daemon\npython3 daemon/main.py\n```\n\nCross-platform details:\n- **macOS/Linux** → runs inside `zsh`/`bash`, inherits your PATH correctly\n- **Windows** → runs in PowerShell, uses your PATH or FVM shims\n\n---\n\n## 🔗 References\n- 💡 [My LinkedIn post about this gadget](https://www.linkedin.com/posts/paulocoutinhox_flutter-esp32-cpp-activity-7365865597064081409-B1M5?utm_source=share\u0026utm_medium=member_desktop\u0026rcm=ACoAAAFt3eYB0c4p9m-g837CTBT2OWyR5UDjsSE)\n- 📝 [Original Flutter community idea post](https://www.linkedin.com/feed/update/urn:li:activity:7365593809138675712?utm_source=share\u0026utm_medium=member_desktop\u0026rcm=ACoAAAFt3eYB0c4p9m-g837CTBT2OWyR5UDjsSE)\n\n---\n\n## 🚀 Getting Started\n1. Clone this repo\n2. Flash the ESP32/Arduino firmware\n3. Install the Python requirements\n4. Run the daemon and press the buttons 🎉\n\n---\n\n## 📜 License\nThis project is licensed under the [MIT License](LICENSE).\nFeel free to fork, modify, and share.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulocoutinhox%2Fflutter-gadget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulocoutinhox%2Fflutter-gadget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulocoutinhox%2Fflutter-gadget/lists"}