Skip to main content

fluxota_sdk 0.1.0-dev.4 copy "fluxota_sdk: ^0.1.0-dev.4" to clipboard
fluxota_sdk: ^0.1.0-dev.4 copied to clipboard

PlatformAndroid

Signed Dart over-the-air updates for Android Flutter apps, with startup health checks and automatic recovery.

example/fluxota_sdk_example.dart

import 'dart:async';

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

// First configure the Android host/public roots with the Fluxota CLI and build
// a release reference. This Dart example alone does not provision that setup.
void main() {
  final binding = WidgetsFlutterBinding.ensureInitialized();
  final updater = FluxotaUpdater();
  runApp(const MaterialApp(home: FluxotaExample()));
  unawaited(_checkAfterStartup(binding, updater));
}

Future<void> _checkAfterStartup(
  WidgetsBinding binding,
  FluxotaUpdater updater,
) async {
  await binding.waitUntilFirstFrameRasterized;
  try {
    // Run any additional application-specific health checks before this call.
    await updater.markHealthy();
    await updater.checkForUpdate();
  } on FluxotaUpdateException {
    // Keep the application usable; schedule a later opportunity to check again.
  }
}

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

  @override
  Widget build(BuildContext context) => const Scaffold(
    body: Center(child: Text('Fluxota Android developer pilot')),
  );
}
0
likes
160
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Signed Dart over-the-air updates for Android Flutter apps, with startup health checks and automatic recovery.

Repository (GitHub)

Topics

#ota #updates #android

License

BSD-3-Clause (license)

Dependencies

flutter, meta

More

Packages that depend on fluxota_sdk

Packages that implement fluxota_sdk