update_app 0.1.5 copy "update_app: ^0.1.5" to clipboard
update_app: ^0.1.5 copied to clipboard

outdated

Update the app, pass in the updated address, and update the app. The Android part is implemented using DownloadManager.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:update_app/update_app.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Update app'),
        ),
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              Text('click right bottom download button download!'),
              Text('Adapt to Android 6.0'),
              Text('Adapt to Android 7.0'),
              Text('Adapt to Android 8.0'),
              Text('Adapt to Android 9.0'),
              Text('Adapt to Android 10.0'),
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: download,
          child: Icon(Icons.file_download),
        ),
      ),
    );
  }

  void download() async {
    var name = await UpdateApp.updateApp(
        url: "https://mofada.cn/apks/example.apk", appleId: "375380948");
    print(name);

    setState(() {});
  }
}
10
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

Update the app, pass in the updated address, and update the app. The Android part is implemented using DownloadManager.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on update_app

Packages that implement update_app