ArgumentDecoders class

A set of methods for decoding structured values from a DataSource.

Specifically, these methods decode types that are used by local widgets (q.v. createCoreWidgets).

These methods take a DataSource and a key. The key is a path to the part of the DataSource that the value should be read from. This may identify a map, a list, or a leaf value, depending on the needs of the method.

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 Properties

colorFilterDecoders Map<String, ArgumentDecoder<ColorFilter?>>
Extension mechanism for colorFilter.
final
curveDecoders Map<String, ArgumentDecoder<Curve>>
Extension mechanism for curve.
final
decorationDecoders Map<String, ArgumentDecoder<Decoration?>>
Extension mechanism for decoration.
final
gradientDecoders Map<String, ArgumentDecoder<Gradient?>>
Extension mechanism for gradient.
final
gridDelegateDecoders Map<String, ArgumentDecoder<SliverGridDelegate?>>
Extension mechanism for gridDelegate.
final
imageProviderDecoders Map<String, ArgumentDecoder<ImageProvider<Object>?>>
Extension mechanism for imageProvider.
final
maskFilterDecoders Map<String, ArgumentDecoder<MaskFilter?>>
Extension mechanism for maskFilter.
final
shaderDecoders Map<String, ArgumentDecoder<Shader?>>
Extension mechanism for shader.
final
shapeBorderDecoders Map<String, ArgumentDecoder<ShapeBorder>>
Extension mechanism for shapeBorder.
final

Static Methods

alignment(DataSource source, List<Object> key) AlignmentGeometry?
Decodes an AlignmentDirectional or Alignment object out of the specified map.
border(DataSource source, List<Object> key) BoxBorder?
Returns a BorderDirectional from the specified list.
borderRadius(DataSource source, List<Object> key) BorderRadiusGeometry?
Returns a BorderRadiusDirectional from the specified list.
borderSide(DataSource source, List<Object> key) BorderSide?
Returns a BorderSide from the specified map.
boxConstraints(DataSource source, List<Object> key) BoxConstraints?
Decodes the specified map into a BoxConstraints.
boxShadow(DataSource source, List<Object> key) BoxShadow
Returns a BoxShadow from the specified map.
color(DataSource source, List<Object> key) Color?
Returns a Color from the specified integer.
colorFilter(DataSource source, List<Object> key) ColorFilter?
Returns a ColorFilter from the specified map.
colorMatrix(DataSource source, List<Object> key) List<double>?
Returns a list of 20 doubles from the specified list.
colorOrBlack(DataSource source, List<Object> key) Color
Returns a Color from the specified integer.
curve(DataSource source, List<Object> key, BuildContext context) Curve
Returns a Curve from the specified string.
decoration(DataSource source, List<Object> key) Decoration?
Returns a Decoration from the specified map.
decorationImage(DataSource source, List<Object> key) DecorationImage?
Returns a DecorationImage from the specified map.
doubleOrZero(DataSource source, List<Object> key) double
Returns a double from the specified double.
duration(DataSource source, List<Object> key, BuildContext context) Duration
Returns a Duration from the specified integer.
edgeInsets(DataSource source, List<Object> key) EdgeInsetsGeometry?
Returns an EdgeInsetsDirectional from the specified list.
enumValue<T>(List<T> values, DataSource source, List<Object> key) → T?
Returns one of the values of the specified enum T, from the specified string.
fontFeature(DataSource source, List<Object> key) FontFeature
Returns a FontFeature from the specified map.
gradient(DataSource source, List<Object> key) Gradient?
Returns a Gradient from the specified map.
gridDelegate(DataSource source, List<Object> key) SliverGridDelegate?
Returns a SliverGridDelegate from the specified map.
iconData(DataSource source, List<Object> key) IconData?
Returns an IconData from the specified map.
iconThemeData(DataSource source, List<Object> key) IconThemeData?
Returns an IconThemeData from the specified map.
imageProvider(DataSource source, List<Object> key) ImageProvider<Object>?
Returns an ImageProvider from the specifed map.
list<T>(DataSource source, List<Object> key, ArgumentDecoder<T> decoder) List<T>?
Returns a List of T values from the specified list, using the given decoder to parse each value.
locale(DataSource source, List<Object> key) Locale?
Returns a Locale from the specified string.
maskFilter(DataSource source, List<Object> key) MaskFilter?
Returns a MaskFilter from the specified map.
matrix(DataSource source, List<Object> key) Matrix4?
Returns a list of 16 doubles from the specified list.
offset(DataSource source, List<Object> key) Offset?
Returns an Offset from the specified map.
paint(DataSource source, List<Object> key) Paint?
Returns a Paint from the specified map.
radius(DataSource source, List<Object> key) Radius?
Returns a Radius from the specified map.
rect(DataSource source, List<Object> key) Rect?
Returns a Rect from the specified map.
shader(DataSource source, List<Object> key) Shader?
Returns a Shader based on the specified map.
shapeBorder(DataSource source, List<Object> key) ShapeBorder?
Returns a ShapeBorder from the specified map or list.
string(DataSource source, List<Object> key) String
Returns a string from the specified string.
strutStyle(DataSource source, List<Object> key) StrutStyle?
Returns a StrutStyle from the specified map.
textDecoration(DataSource source, List<Object> key) TextDecoration
Returns a TextDecoration from the specified list or string.
textHeightBehavior(DataSource source, List<Object> key) TextHeightBehavior?
Returns a TextHeightBehavior from the specified map.
textStyle(DataSource source, List<Object> key) TextStyle?
Returns a TextStyle from the specified map.
visualDensity(DataSource source, List<Object> key) VisualDensity?
Returns a VisualDensity from the specified string or map.