uninstall_apps_plus 0.0.5 icon indicating copy to clipboard operation
uninstall_apps_plus: ^0.0.5 copied to clipboard

PlatformAndroid

Uninstall android apps by using intent.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:uninstall_apps/uninstall_apps.dart';

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

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

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    await UninstallApps.uninstall("com.instagram.android");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: TextButton(
            child: Text("Uninstall"),
            onPressed: () {
              initPlatformState();
            },
          ),
        ),
      ),
    );
  }
}
0
likes
100
pub points
19%
popularity

Publisher

unverified uploader

Uninstall android apps by using intent.

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on uninstall_apps_plus