JsonWidgetRegistry constructor

JsonWidgetRegistry({
  1. Map<String, JsonWidgetBuilderContainer>? builders,
  2. String? debugLabel,
  3. bool disableValidation = false,
  4. Map<String, JsonWidgetFunction>? functions,
  5. GlobalKey<NavigatorState>? navigatorKey,
  6. Map<String, dynamic>? values,
})

Constructs a one-off registry. This accepts an optional group of custom widget builders, custom widget functions, and widget values.

Implementation

JsonWidgetRegistry({
  Map<String, JsonWidgetBuilderContainer>? builders,
  this.debugLabel,
  this.disableValidation = false,
  Map<String, JsonWidgetFunction>? functions,
  this.navigatorKey,
  Map<String, dynamic>? values,
}) {
  _customBuilders.addAll(builders ?? {});
  _functions.addAll(functions ?? {});
  _values.addAll(values ?? {});
}