β‘ flutter_esptool
π A professional Flutter package for ESP8266/ESP32 serial bootloader operations: chip detection, flash write/erase/read flows, MAC queries, and protocol utilities.
β¨ Features
- π§ Chip detection via ROM register magic + MAC address read.
- πΎ Flash write/erase flows with optional compression and MD5 verification.
- π¦ Clean layered architecture (
application,domain,transport,infrastructure,models). - π§ͺ Hardware-free tests with scripted/mocked transport.
- π₯οΈ Professional multilingual demo app in
example/esptool_ui.
π Installation
dependencies:
flutter_esptool: ^0.1.3
π§ Development Commands
flutter pub get
flutter analyze
flutter test
flutter test test\unit
flutter test test\integration
flutter test test\e2e
dart pub publish --dry-run
Cross-platform automation lives in scripts/:
| Workflow | Windows | Linux | macOS | Report |
|---|---|---|---|---|
| Setup dev machine | scripts\\windows\\setup-dev.ps1 |
scripts/linux/setup-dev.sh |
scripts/macos/setup-dev.zsh |
terminal summary |
| Run tests | scripts\\windows\\run-tests.ps1 |
scripts/linux/run-tests.sh |
scripts/macos/run-tests.zsh |
reports/tests/<timestamp>/ |
| Build examples | scripts\\windows\\build.ps1 |
scripts/linux/build.sh |
scripts/macos/build.zsh |
reports/builds/<timestamp>/ |
Single test file:
flutter test test/unit/transport/slip_codec_test.dart
Single test by name:
flutter test test/unit/transport/slip_codec_test.dart --plain-name "round-trips a payload through encode and decode"
π Documentation
doc/ARCHITECTURE.mdβ system architecture, service boundaries, and protocol data flowdoc/WORKFLOWS.mdβ setup/test/build workflows with Mermaid diagramsdoc/PROJECT_OPERATIONS_AND_QUALITY_GUIDE.mdβ professional operations, security, and full-spectrum testing guidescripts/README.mdβ cross-platform automation scriptsdoc/PUBLISHING.mdβ pub.dev trusted-publishing release processdoc/GITFLOW.mdβ branching and version strategydoc/DEMO_APP.mdβ demo features and execution.github/copilot-instructions.mdβ Copilot project guidance
π§ͺ Demo Application
Run the professional demo:
cd example\esptool_ui
flutter pub get
flutter run
The demo includes:
- π light/dark professional themes
- π multi-language UI (
en,fr,es,pt,de,it,nl,ru,ar,he,zh,ja,ko) - β¨ splash screen
- βοΈ live serial-port workflow for connect, chip detection, MAC, flash info, erase, write, and MD5
πΊοΈ High-level workflow
flowchart LR
UI[Flutter UI / CLI] --> Services[Application services]
Services --> Transport[ESP transport]
Transport --> Serial[platform_serial]
Serial --> Device[ESP ROM bootloader]
Services --> Reports[tests/build reports]
π License
This project is licensed under the MIT License.
π CI, security, and merge gates
- PR open/update events trigger analyzer + unit/integration/e2e test jobs.
- Owner-authored PRs targeting
mainare auto-approved and auto-merged only after successful PR validation. - Release publication uses GitHub OIDC trusted publishing (no long-lived
PUB_DEV_PUBLISH_TOKENsecret).
Libraries
- flutter_esptool
- Public API for the flutter_esptool package.