flutter_ota_platform 1.0.0 copy "flutter_ota_platform: ^1.0.0" to clipboard
flutter_ota_platform: ^1.0.0 copied to clipboard

Flutter client SDK for the Flutter OTA Platform — check for and apply over-the-air app updates from your hosted OTA API.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_ota_platform/flutter_ota_platform.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await FlutterOTA.initialize(
    appId: 'YOUR_APP_UUID',
    channel: 'stable',
    baseUrl: 'https://flutter-ota-api.vercel.app/v1',
  );

  runApp(const ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('OTA example')),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              final result = await FlutterOTA.checkForUpdate();
              debugPrint('status=${result.status} hasUpdate=${result.hasUpdate}');
            },
            child: const Text('Check for update'),
          ),
        ),
      ),
    );
  }
}
0
likes
140
points
93
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Flutter client SDK for the Flutter OTA Platform — check for and apply over-the-air app updates from your hosted OTA API.

Repository (GitHub)
View/report issues

Topics

#ota #updates #flutter

License

MIT (license)

Dependencies

crypto, device_info_plus, flutter, http, package_info_plus, path_provider, shared_preferences

More

Packages that depend on flutter_ota_platform