JsonPlaceholder constructor

JsonPlaceholder({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. Color color = const Color(0xFF455A64),
  4. double fallbackHeight = 400.0,
  5. double fallbackWidth = 400.0,
  6. double strokeWidth = 2.0,
  7. JsonWidgetData? child,
})

Implementation

JsonPlaceholder({
  Map<String, dynamic> args = const {},
  JsonWidgetRegistry? registry,
  this.color = const Color(0xFF455A64),
  this.fallbackHeight = 400.0,
  this.fallbackWidth = 400.0,
  this.strokeWidth = 2.0,
  this.child,
}) : super(
        jsonWidgetArgs: JsonPlaceholderBuilderModel.fromDynamic(
          {
            'color': color,
            'fallbackHeight': fallbackHeight,
            'fallbackWidth': fallbackWidth,
            'strokeWidth': strokeWidth,
            'child': child,
            ...args,
          },
          args: args,
          registry: registry,
        ),
        jsonWidgetBuilder: () => JsonPlaceholderBuilder(
          args: JsonPlaceholderBuilderModel.fromDynamic(
            {
              'color': color,
              'fallbackHeight': fallbackHeight,
              'fallbackWidth': fallbackWidth,
              'strokeWidth': strokeWidth,
              'child': child,
              ...args,
            },
            args: args,
            registry: registry,
          ),
        ),
        jsonWidgetType: JsonPlaceholderBuilder.kType,
      );