canopy_sdk library

Open-source code push for Flutter.

Push updates to your apps instantly with Canopy.

Getting started

import 'package:canopy/canopy_sdk.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await CanopyUpdater.instance.init(
    serverUrl: 'https://canopy.example.com',
    appId: 'com.example.myapp',
  );

  CanopyUpdater.instance.reportBootSuccess();
  runApp(const MyApp());
}

Classes

CanopyConfig
Holds the configuration used to initialise CanopyUpdater.
CanopyUpdater
The main entry point for the Canopy code-push SDK.
UpdateAppliedEvent
Emitted after a patch has been successfully downloaded and staged. The patch will be applied on the next app restart.
UpdateAvailableEvent
Emitted when a newer patch is available on the server.
UpdateCheckingEvent
Emitted when the updater starts checking for a new patch.
UpdateDownloadingEvent
Emitted periodically while a patch is being downloaded.
UpdateEvent
Base class for all update lifecycle events emitted by CanopyUpdater.
UpdateFailedEvent
Emitted when the update process fails at any stage.
UpdateUpToDateEvent
Emitted when the app is already running the latest patch.

Enums

CanopyPlatform
Platforms supported by the Canopy SDK.
UpdateStatus
Status returned after checking for updates.