App Launcher Icon Widget with Flutter

App Launcher Icon Widget

Flutter plugin providing a widget and data for displaying the app launcher icon in Android & iOS.

Installation Guide

Check here

Usage

Using the widget

import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart';

// ...

AppLauncherIcon(
width: 64, //optional
height: 64, //optional
)

Using the method

import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart';

// ...

Uint8List? appIcon = await AppLauncherIconWidget.getAppLauncherIcon();

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add app_launcher_icon_widget

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  app_launcher_icon_widget: ^1.0.0

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:app_launcher_icon_widget/app_launcher_icon_widget.dart'; 

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text("App Launcher Icon"),
        ),
        body: Center(
          child: AppLauncherIcon(),
        ),
      ),
    );
  }
} 

Download details:

Author: sharmadhiraj

Source: https://github.com/sharmadhiraj/app-launcher-icon-widget

#widget #flutter #icon 

App Launcher Icon Widget with Flutter
5.35 GEEK