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

Dynamic App Icon, for a beginning this will only be for web favicon, because there is no way to change that with flutter, for later it is intended that we support app icons on Android and iOS.

example/lib/main.dart

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

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

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

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

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

class _MyAppState extends State<MyApp> {
  final _iconPlugin = IconPlugin();

  @override
  void initState() {
    super.initState();
    _iconPlugin.setIcon(icon: 'favicon.png');
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Check the icon'),
        ),
      ),
    );
  }
}
0
likes
130
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Dynamic App Icon, for a beginning this will only be for web favicon, because there is no way to change that with flutter, for later it is intended that we support app icons on Android and iOS.

Homepage

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on icon_plugin