dfa 0.0.1 copy "dfa: ^0.0.1" to clipboard
dfa: ^0.0.1 copied to clipboard

discontinued

Dynamic Flutter for Android.

dfa_flutter_plugin #

A Flutter plugin for updating your android applications dynamically, it supports both dart code and assets.

Getting Started #

Add dependency to your pubspec.yaml file:

dependencies:
  dfa: x.y.z

Usage #

import 'package:dfa/dfa.dart';

// ------ Core API ------

// Install patch from the given archive file.
DfaManager.installPatch(file);
// Get loaded patch(may be null).
DfaManager.getLoadedPatch();
// Get installed patch(may be null).
DfaManager.getInstalledPatch();
// Retrive archive info from the given archive file.
DfaManager.getArchiveInfo(file);
// Delete a patch.
DfaManager.deletePatch(patch);
// Clean all patch data.
DfaManager.cleanAll();

// ------ Dev API ------

// Open dev page, this page shows current patch info.
DfaManager.openDevPage();
// Choose a file from the system File Chooser.
DfaManager.choosePatchFile();

About assets #

Override the default asset bundle in suitable position:

DefaultAssetBundle(
  bundle: DfaManager.getAssetBundle(),
  child: MaterialApp(
    ...
  ),
);

If you are using rootBundle explicitly in dart code, you should replace it with DfaManager.getAssetBundle() for the asset patch to take ettect.

0
likes
10
pub points
0%
popularity

Publisher

unverified uploader

Dynamic Flutter for Android.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

archive, flutter

More

Packages that depend on dfa