flutter_update 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 70

flutter_update #

To update your app to newest version. Only Support Android Device for now.

Getting Started #

You have to download the newest app to your device, then call FlutterUpdate to install it by using the file path. You can use it like this.

import 'package:flutter_update/flutter_update.dart';
void main(){

Future Work #

Maybe I will add function download to this lib,for more easiler use. For now, I want the coder download by self,for coder to make some custom tip or festures.

Partner Wanted #

I am good at Android,but know less about ios. If you want make it support IOS devices, Just email to me, or take an issue. (New Issue)[https://github.com/YunlongYang/flutter_update/issues/new]

1.0.0 #

  • args change to (String appHomeUrl,String filePath),for future support IOS devices.

0.0.1 #

  • Make it work on Android.


flutter_update_example #

You have to download the newest app to your device, then call me to install it by using the file path.

About Android FileProvider #

  • For safe,Android use FileProvider to share files between diffenrent apps.
  • You can change the default FileProvider authorities by this way.
  • There are two places that you should replace. Just find all "your.auth",and replace to yours.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.github.yyl.update.flutterupdateexample" 
     <meta-data android:name="FILE_PROVIDER_AUTHORITIES" tools:replace="android:value" android:value="your.auth"/>

        <provider android:name="android.support.v4.content.FileProvider" tools:replace="android:authorities" android:authorities="your.auth" android:exported="false" android:grantUriPermissions="true">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />


Tips #

You must add this attr "xmlns:tools" to node manifest.

<manifest xmlns:tools="http://schemas.android.com/tools">

Getting Started #

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {

  void initState() {

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('flutter_update example'),
        body: Column(
            children: <Widget>[
                child:Text('Move one apk file to /sdcard/Android/tmp/app.apk\nThen click Install'),
                icon: Icon(Icons.open_in_new),
                label: Text("Install"),
                onPressed: (){

Use this package as a library

1. Depend on it

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

  flutter_update: ^1.0.0

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_update/flutter_update.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/flutter_update.dart.

Run flutter format to format lib/flutter_update.dart.

Maintenance suggestions

The package description is too short. (-20 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.

Package is getting outdated. (-5.75 points)

The package was last published 55 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8