app_installer 1.2.1 copy "app_installer: ^1.2.1" to clipboard
app_installer: ^1.2.1 copied to clipboard

A new Android + iOS app installer plugin , supports opening app stores and editor reviews, as well as installing Apk files.

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> {
  /// 应用市场信息
  String androidAppId = 'com.tengyue360.student';
  String iOSAppId = '1440249706';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              SizedBox(height: 80),
              TextButton.icon(
                onPressed: () {
                  AppInstaller.goStore(androidAppId, iOSAppId);
                },
                icon: Icon(Icons.store),
                label: Text('Go Store'),
              ),
              SizedBox(height: 40),
              TextButton.icon(
                onPressed: () {
                  AppInstaller.goStore(androidAppId, iOSAppId, review: true);
                },
                icon: Icon(Icons.rate_review),
                label: Text('Go Store Review'),
              ),
              SizedBox(height: 40),
              Text(
                '⚠️需要先允许读取存储权限才可以⚠️',
                style: TextStyle(color: Colors.red),
              ),
              TextButton.icon(
                onPressed: () {
                  // 需要先允许读取存储权限才可以
                  // 需要先允许读取存储权限才可以
                  // 需要先允许读取存储权限才可以
                  AppInstaller.installApk('/sdcard/app/app-debug.apk');
                },
                icon: Icon(Icons.arrow_downward),
                label: Text('Install Apk'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
67
likes
160
pub points
94%
popularity

Publisher

verified publisherbyteszero.cn

A new Android + iOS app installer plugin , supports opening app stores and editor reviews, as well as installing Apk files.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on app_installer