JsonMaterial constructor
JsonMaterial({
- Map<
String, dynamic> args = const {}, - JsonWidgetRegistry? registry,
- Duration animationDuration = kThemeChangeDuration,
- bool borderOnForeground = true,
- BorderRadius? borderRadius,
- Clip clipBehavior = Clip.none,
- Color? color,
- double elevation = 0.0,
- EdgeInsetsGeometry? margin,
- MaterialType materialType = MaterialType.canvas,
- EdgeInsetsGeometry? padding,
- Color? shadowColor,
- ShapeBorder? shape,
- Color? surfaceTintColor,
- TextStyle? textStyle,
- JsonWidgetData? child,
Implementation
JsonMaterial({
Map<String, dynamic> args = const {},
JsonWidgetRegistry? registry,
this.animationDuration = kThemeChangeDuration,
this.borderOnForeground = true,
this.borderRadius,
this.clipBehavior = Clip.none,
this.color,
this.elevation = 0.0,
this.margin,
this.materialType = MaterialType.canvas,
this.padding,
this.shadowColor,
this.shape,
this.surfaceTintColor,
this.textStyle,
this.child,
}) : super(
jsonWidgetArgs: JsonMaterialBuilderModel.fromDynamic(
{
'animationDuration': animationDuration,
'borderOnForeground': borderOnForeground,
'borderRadius': borderRadius,
'clipBehavior': clipBehavior,
'color': color,
'elevation': elevation,
'margin': margin,
'materialType': materialType,
'padding': padding,
'shadowColor': shadowColor,
'shape': shape,
'surfaceTintColor': surfaceTintColor,
'textStyle': textStyle,
'child': child,
...args,
},
args: args,
registry: registry,
),
jsonWidgetBuilder: () => JsonMaterialBuilder(
args: JsonMaterialBuilderModel.fromDynamic(
{
'animationDuration': animationDuration,
'borderOnForeground': borderOnForeground,
'borderRadius': borderRadius,
'clipBehavior': clipBehavior,
'color': color,
'elevation': elevation,
'margin': margin,
'materialType': materialType,
'padding': padding,
'shadowColor': shadowColor,
'shape': shape,
'surfaceTintColor': surfaceTintColor,
'textStyle': textStyle,
'child': child,
...args,
},
args: args,
registry: registry,
),
),
jsonWidgetType: JsonMaterialBuilder.kType,
);