JsonMaterial constructor

JsonMaterial({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. Duration animationDuration = kThemeChangeDuration,
  4. bool borderOnForeground = true,
  5. BorderRadius? borderRadius,
  6. Clip clipBehavior = Clip.none,
  7. Color? color,
  8. double elevation = 0.0,
  9. EdgeInsetsGeometry? margin,
  10. MaterialType materialType = MaterialType.canvas,
  11. EdgeInsetsGeometry? padding,
  12. Color? shadowColor,
  13. ShapeBorder? shape,
  14. Color? surfaceTintColor,
  15. TextStyle? textStyle,
  16. 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,
      );