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

PlatformAndroid

This is a flutter package that will enable you switch between different laucher icons in your app.

example/lib/main.dart

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

final launcherSwitch = LauncherSwitch();

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Laucher Switch"),
        backgroundColor: Theme.of(context).primaryColor,
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                launcherSwitch.switchIcon(
                  iconKey: ".Icon2",
                  previousIconKey: ".MainActivity",
                );
              },
              child: const Text("Switch icon"),
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
160
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

This is a flutter package that will enable you switch between different laucher icons in your app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on launcher_switch