JsonAssetImageBuilder class

Builder that can build an Image widget using bundled assets. See the fromDynamic for the format.

Inheritance

Constructors

JsonAssetImageBuilder({required Alignment alignment, int? cacheHeight, int? cacheWidth, Rect? centerSlice, Color? color, BlendMode? colorBlendMode, ImageErrorWidgetBuilder? errorBuilder, required bool excludeFromSemantics, required FilterQuality filterQuality, BoxFit? fit, ImageFrameBuilder? frameBuilder, required bool gaplessPlayback, double? height, required bool isAntiAlias, required bool matchTextDirection, required String name, double? opacity, String? package, required ImageRepeat repeat, double? scale, String? semanticLabel, double? width})

Properties

alignment Alignment
final
cacheHeight int?
final
cacheWidth int?
final
centerSlice Rect?
final
color Color?
final
colorBlendMode BlendMode?
final
errorBuilder ImageErrorWidgetBuilder?
final
excludeFromSemantics bool
final
filterQuality FilterQuality
final
fit BoxFit?
final
frameBuilder ImageFrameBuilder?
final
gaplessPlayback bool
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
isAntiAlias bool
final
matchTextDirection bool
final
name String
final
numSupportedChildren int
finalinherited
opacity double?
final
package String?
final
preferredSizeWidget bool
finalinherited
repeat ImageRepeat
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double?
final
semanticLabel String?
final
width double?
final

Methods

build({required ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data}) Widget
Builds the widget. If there are dynamic keys on the data object, and the widget is not a PreferredSizeWidget, then the returned widget will be wrapped by a stateful widget that will rebuild if any of the dynamic args change in value.
inherited
buildCustom({ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data, Key? key}) Widget
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
override
getChild(JsonWidgetData? data, {int index = 0}) JsonWidgetData
Returns a non-null child for widgets that must always have child widgets. This allows the widget to be built and rendered even if the child is missing.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(JsonWidgetData data) → void
Called when a JSON widget is removed from the tree due to a conditional. Custom widgets may need to implement this to clean up values that may have been placed on the JsonWidgetRegistry by the widget.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromDynamic(dynamic map, {JsonWidgetRegistry? registry}) JsonAssetImageBuilder?
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:

Constants

kNumSupportedChildren → const int
type → const String