flutter_ymodem_lib 0.0.1
flutter_ymodem_lib: ^0.0.1 copied to clipboard
A pure Dart implementation of the YModem file transfer protocol for Flutter. Works on Android, iOS, Windows, macOS and Linux without any native code, ideal for BLE OTA firmware upgrades (e.g. together [...]
example/lib/main.dart
import 'package:flutter/material.dart';
import 'scan_page.dart';
/// Example application for [flutter_ymodem_lib]: scans for BLE devices and
/// sends a firmware file to the selected device using the YModem protocol.
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const YModemOtaApp());
}
class YModemOtaApp extends StatelessWidget {
const YModemOtaApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'YModem OTA Example',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorSchemeSeed: Colors.blue,
useMaterial3: true,
),
darkTheme: ThemeData(
colorSchemeSeed: Colors.blue,
brightness: Brightness.dark,
useMaterial3: true,
),
home: const ScanPage(),
);
}
}