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

A flutter plugin to change the app icons and label in real time.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:live_icon/live_icon.dart';

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

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

class _MyAppState extends State<MyApp> {
  LiveIcon liveIcon = LiveIcon();

  @override
  void initState() {
    LiveIcon.initialize(
      classNames: ['MainActivity', 'DarkTheme', 'LightTheme'],
    );
    super.initState();
  }

  void switchAppIcon() async {
    await liveIcon.switchIconTo(
      className: 'LightTheme',
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ElevatedButton(
            child: Text('switch To DarkThemeIcon'),
            onPressed: () {
              switchAppIcon();
            },
          ),
        ),
      ),
    );
  }
}
35
likes
160
points
20
downloads

Publisher

verified publisherhackthedeveloper.com

Weekly Downloads

A flutter plugin to change the app icons and label in real time.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on live_icon