- Notifications
You must be signed in to change notification settings - Fork0
Get native icon as flutter widget, Get system desktop app icon and name, Get current app logo.
License
fluttercandies/flutter_get_native_icon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
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.
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.
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
Property | Type | Description |
---|---|---|
width | double? | The width of the icon |
height | double? | The height of the icon |
fit | BoxFit? | How the icon should be inscribed into its box |
color | Color? | The color to tint the icon with |
colorBlendMode | BlendMode? | The blend mode for applying the color |
opacity | Animation<double>? | The opacity of the icon |
alignment | AlignmentGeometry? | How to align the icon within its bounds |
margin | EdgeInsetsGeometry? | The margin around the icon |
shape | BoxShape | The shape of the icon (rectangle or circle) |
borderRadius | BorderRadius? | The border radius when shape is rectangle |
seepackage_info_plus
plugin and use code:
Future<void>_loadAppInfo()async {PackageInfo packageInfo=awaitPackageInfo.fromPlatform();setState(() { appName= packageInfo.appName; }); }
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.