ImageAssetExtension extension
Provides functions for converting an ImageAsset to a Flutter Image.
Example:
class Foo extends StatelessWidget {
final ImageAsset asset;
@override
Widget build(BuildContext context) => Container(
child: asset(
width: 100,
height: 100,
),
);
}
- on
Methods
-
call(
{Key? key, ImageFrameBuilder? frameBuilder, ImageErrorWidgetBuilder? errorBuilder, String? semanticLabel, bool excludeFromSemantics = false, double? scale, double? width, double? height, Color? color, Animation< double> ? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, bool isAntiAlias = false, FilterQuality filterQuality = FilterQuality.low, int? cacheWidth, int? cacheHeight}) → Image - Converts an ImageAsset to an Image.