FlutterDrawableMipmap class
Loads native images as PNG bytes.
width and height are logical pixels. When both are null the image
keeps its natural size. scale defaults to the device pixel ratio.
brightness picks light or dark variants, defaulting to the system setting.
Each method returns null when the image does not exist.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
appIcon(
{double? width, double? height, double? scale, Brightness? brightness}) → Future< Uint8List?> - The app's launcher icon.
-
drawable(
String name, {double? width, double? height, double? scale, Brightness? brightness}) → Future< Uint8List?> -
Android
res/drawableor iOS asset catalog image namedname. -
drawableMipmap(
String name, bool isDrawable) → Future< Uint8List?> - Use drawable or mipmap instead.
-
load(
NativeImageType type, String name, {double? width, double? height, double? scale, Brightness? brightness}) → Future< Uint8List?> -
Loads an image of
typenamedname.nameis ignored for NativeImageType.appIcon. -
mipmap(
String name, {double? width, double? height, double? scale, Brightness? brightness}) → Future< Uint8List?> -
Android
res/mipmapimage namedname. Returnsnullon iOS. -
system(
String name, {double? width, double? height, double? scale, Brightness? brightness}) → Future< Uint8List?> -
Android
android.R.drawableor iOS SF Symbol namedname.