app_launcher_icon_widget 1.0.1
app_launcher_icon_widget: ^1.0.1 copied to clipboard
Flutter plugin providing a widget and data for displaying the app launcher icon.
App Launcher Icon Widget #
A Flutter plugin to display or retrieve the app's launcher icon on Android and iOS, perfect for splash screens or custom UI.
Installation #
Check here
Usage #
Display the Icon #
Use the AppLauncherIcon
widget to show the app's icon:
import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart';
AppLauncherIcon(
width: 64, // Optional, defaults to 48
height: 64, // Optional, defaults to 48
placeholder: Icon(Icons.image), // Optional widget to show if icon cannot be loaded
)
Retrieve the Icon #
Get the icon as a Uint8List
for custom use:
import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart';
Uint8List? appIcon = await AppLauncherIconWidget.getAppLauncherIcon();
Notes #
- Ensure icons are configured in
android/app/src/main/res
(Android) andAssets.xcassets
(iOS). - Supports adaptive icons on Android 8.0+.
- Check pub.dev for updates.