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();
            },
          ),
        ),
      ),
    );
  }
}
34
likes
140
pub points
31%
popularity

Publisher

verified publisherhackthedeveloper.com

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