apps_uninstaller 0.0.1 copy "apps_uninstaller: ^0.0.1" to clipboard
apps_uninstaller: ^0.0.1 copied to clipboard

If user clicks 'OK' button the returned value will be true else it will be false.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _unistalledStatus = '';


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(onPressed: () async {
                var isUninstalled = await AppsUninstaller.uninstallApp("com.example.testapplication");
                setState(() {
                  _unistalledStatus = isUninstalled?'Successfully Uninstall' : 'Cancelled by user';
                });
              }, child: const Text("Uninstall Test Application")),
              const SizedBox(height: 10),
              Text(_unistalledStatus,style: const TextStyle(fontSize: 18),),
            ],
          ),
        )
      ),
    );
  }
}
3
likes
140
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

If user clicks 'OK' button the returned value will be true else it will be false.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on apps_uninstaller