application_icon 1.0.0

Flutter Android iOS

This package provides a widget which shows the application icon of your app.

Application Icon #

Pub GitHub Workflow Status

This package provides a widget which shows the application icon of your app.

It tries to use the highest resolution icon of your app icon on iOS. On Android on API levels equal or higher than 26 (Android O) it tries to show the Adaptive Icon if available. Otherwise, it just shows the normal application icon.

If an adaptive icon is available it can be long pressed and dragged around. It tries to mimick the dragging in the app launcher.

Setup #

First, you will need to add application_icon to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  application_icon: x.y.z # use the latest version found on pub.dev

Then, run flutter packages get in your terminal.

Example #

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          // use AppIcon to show your application icon
          child: AppIconImage(),
        ),
      ),
    );
  }
}

If you are not interested in displaying the app icon you can also load the image with the AppIconInfo class.

0
likes
100
pub points
44%
popularity

Publisher

uekoetter.dev

This package provides a widget which shows the application icon of your app.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on application_icon