android_autostart 0.0.3 copy "android_autostart: ^0.0.3" to clipboard
android_autostart: ^0.0.3 copied to clipboard

PlatformAndroid

You can request to enable AutoStart with Android AutoStart. Many Developers need to access AutoStart Setting Flutter including me, but there's no good plugin yet for autostart.So I decided to make Aut [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:android_autostart/android_autostart.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('Enable AutoStart Example App'),
        ),
        body: Center(
          child: Column(
            children: [
              ElevatedButton(
                onPressed: () async =>
                    await AndroidAutostart.navigateAutoStartSetting,
                child: Text("Navigate AutoStart Setting"),
              ),
              ElevatedButton(
                onPressed: () async =>
                    await AndroidAutostart.customSetComponent(
                  manufacturer: "xiaomi",
                  pkg: "com.miui.securitycenter",
                  cls:
                      "com.miui.permcenter.autostart.AutoStartManagementActivity",
                ),
                child: Text("Custom Set Component"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
16
likes
120
pub points
75%
popularity

Publisher

verified publishermidcarry.tk

You can request to enable AutoStart with Android AutoStart. Many Developers need to access AutoStart Setting Flutter including me, but there's no good plugin yet for autostart.So I decided to make AutoStart Plugin for Developers.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on android_autostart