https://demensdeum.com/demos/FlutDataStream/demo.mp4
A Flutter application that converts any file into a series of machine-readable codes (QR & DataMatrix) for high-speed data streaming between devices.
- Dual Encoding: Presents each data block as both a QR Code and a DataMatrix code simultaneously.
- High-Speed Streaming: Supports an automatic switching interval as fast as 330ms.
- Intelligent Chunking: Automatically splits files into configurable chunks (default: 512 bytes).
- Verbose Scanner: Real-time ASCII readout of the currently scanned code for debugging and immediate feedback.
- Automatic Reconstruction: Instantly reconstructs and saves files to the downloads directory.
- System Integration: Automatically opens the saved file using the default system application upon completion.
-
Make sure you have Flutter installed on your system
flutter --version
-
Install dependencies
flutter pub get
-
Run the app
flutter run
- File Selection: Choose any file from your device.
- Chunking: The file is split into chunks (default: 512 bytes).
- Encoding:
- A Header Block is generated with file metadata (name, size, total block count).
- Multiple Data Blocks are generated for the actual content (Base64 encoded).
- Data Transmission:
- Cycle through codes manually or use Auto Switch (default: 330ms) to "stream" the data to another device's camera.
- Collection & Reconstruction: The receiving device scans all blocks (including the header) and automatically saves and opens the reconstructed file.
The protocol uses a pipe-separated format for reliability and efficient parsing.
FlutDataStreamHeaderBlock|{"fileName":"example.txt","fileSize":12345,"totalBlocks":7,"blockSize":512}
FlutDataStreamBlock|1|[base64 encoded data]
FlutDataStreamBlock|2|[base64 encoded data]
...
qr_flutter: QR code generationbarcode_widget: DataMatrix code generationmobile_scanner: High-performance camera scanningopen_filex: Cross-platform file openingfile_picker: File selection from devicepath_provider: File system accesspermission_handler: Android/iOS permission management
- Android
- iOS
- Windows
- macOS
- Linux
- Web