Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Get native icon as flutter widget, Get system desktop app icon and name, Get current app logo.

License

NotificationsYou must be signed in to change notification settings

fluttercandies/flutter_get_native_icon

Repository files navigation

flutter_get_native_icon on pub:https://pub.dev/packages/flutter_get_native_icon

Get native icon as flutter widget, Get system desktop app icon and name.

only support ios now.

Getting Started

depend on the plugin in yourpubspec.yaml file.

dependencies:flutter_get_native_icon:^0.0.4

import the plugin.

import'package:flutter_get_native_icon/flutter_get_native_icon.dart';

use the widget

@overrideWidgetbuild(BuildContext context) {returnScaffold(    appBar:AppBar(      title:Text('App Icon Display'),    ),    body:Center(child:NativeAppIconWidget()),  );}

theNativeAppIconWidget() you can use in any where.

Recommended Tools

use flutter_launcher_icons to generate the app icon.pub:https://pub.dev/packages/flutter_launcher_icons

and please do not useicons_launcher becausemrrhak/icons_launcher#70

Properties

PropertyTypeDescription
widthdouble?The width of the icon
heightdouble?The height of the icon
fitBoxFit?How the icon should be inscribed into its box
colorColor?The color to tint the icon with
colorBlendModeBlendMode?The blend mode for applying the color
opacityAnimation<double>?The opacity of the icon
alignmentAlignmentGeometry?How to align the icon within its bounds
marginEdgeInsetsGeometry?The margin around the icon
shapeBoxShapeThe shape of the icon (rectangle or circle)
borderRadiusBorderRadius?The border radius when shape is rectangle

About get native app Name

seepackage_info_plus plugin and use code:

Future<void>_loadAppInfo()async {PackageInfo packageInfo=awaitPackageInfo.fromPlatform();setState(() {      appName= packageInfo.appName;    });  }

picture

App Icon

fully demo

import'package:flutter/material.dart';import'package:flutter_get_native_icon/flutter_get_native_icon.dart';classMyHomePageextendsStatefulWidget {@override_MyHomePageStatecreateState()=>_MyHomePageState();}class_MyHomePageStateextendsState<MyHomePage> {@overrideWidgetbuild(BuildContext context) {returnScaffold(      appBar:AppBar(        title:Text('App Icon Display'),      ),      body:Center(child:NativeAppIconWidget()),    );  }}voidmain() {runApp(MaterialApp(    home:MyHomePage(),  ));}

About

Get native icon as flutter widget, Get system desktop app icon and name, Get current app logo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp