flutter_updater 0.2.3

flutter_update #

A Flutter download plugin for android device,when download finished,plugin will automatic open archive, permission should be handle by yourself,(file write/read .etc).

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android .

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

simple usage #

implementation

path_provider

or

define some else

final Directory directory = await getTemporaryDirectory();
    FlutterUpdater.instance()
      ..registerCallback(
          successBlock: (updater, result) {
            print("成功啦");
            updater.dispose();
            return;
          },
          progressBlock: (receiveProgress, total) {},
          failureBlock: (updater, reason, flag) {
            print("失败啦$reason");
            updater.dispose();
            return;
          })
      ..download(
          url: "http://download.dcloud.net.cn/HBuilder.9.0.2.macosx_64.dmg",
          savePath: "${directory.path}/xxx/",
          callback: (f) {
            print("ooooobbbbbjjj===>>$f");
          });

##0.2.3

  • 添加进度回调,强制覆盖下载文件

0.0.1 #

  • initial release.

example/README.md

flutter_update_example #

Demonstrates how to use the flutter_update plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_updater: ^0.2.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_updater/flutter_updater.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
43
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
98
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/DownLoadManage.dart.

Run flutter format to format lib/DownLoadManage.dart.

Format lib/flutter_updater.dart.

Run flutter format to format lib/flutter_updater.dart.

Maintenance suggestions

The package description is too short. (-2 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
dio ^3.0.6 3.0.8
flutter 0.0.0
path ^1.6.4 1.6.4
Transitive dependencies
charcode 1.1.3
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.8
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test