App Launcher Icon Widget

A Flutter plugin to display or retrieve the app's launcher icon on Android and iOS.

Installation

dependencies:
  app_launcher_icon_widget: ^1.1.0

Or run:

flutter pub add app_launcher_icon_widget

Usage

Widget

import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart';

AppLauncherIcon(
    width: 64,
    height: 64,
    placeholder: const Icon(Icons.image), // shown while loading or on error
)
Parameter Type Default Description
width double 64 Width of the icon
height double 64 Height of the icon
fit BoxFit BoxFit.contain How the icon fills the box
borderRadius BorderRadius? null Rounded corners
placeholder Widget? null Shown while loading or on error

Raw bytes

import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart';

final Uint8List? bytes = await AppLauncherIconWidget.getAppLauncherIcon();

Platform setup

  • Android — icon defined in android/app/src/main/res/. Adaptive icons (API 26+) are supported.
  • iOS — icon defined in ios/Runner/Assets.xcassets/AppIcon.appiconset/.

License

MIT