app_icon_switcher 0.0.2 copy "app_icon_switcher: ^0.0.2" to clipboard
app_icon_switcher: ^0.0.2 copied to clipboard

PlatformAndroid

Application icon switcher, only works for android

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:app_icon_switcher/app_icon_switcher.dart';

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

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

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  void _updateIcon() async {
    await AppIconSwitcher.updateIcon('ALT');
  }

  void _resetIcon() async =>
    await AppIconSwitcher.resetIcon();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter Icon Switcher'),
        ),
        body: Center(
          child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                TextButton(onPressed: _updateIcon, child: Text("CHANGE ICON")),
                TextButton(onPressed: _resetIcon, child: Text("RESET ICON")),
              ]
          ),
        ),
      ),
    );
  }
}
2
likes
140
pub points
54%
popularity

Publisher

unverified uploader

Application icon switcher, only works for android

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_icon_switcher