recreate method

JsonWidgetData recreate()

Recreates the data object based on the updated values and function responces from the registry. This should only be called within the framework itself, external code should not need to call this.

Implementation

JsonWidgetData recreate() {
  var builder = registry.getWidgetBuilder(type);
  var dynamicParamsResult = registry.processDynamicArgs(args);

  return JsonWidgetData(
    args: args,
    builder: () {
      return builder(
        registry.processDynamicArgs(args ?? <String, dynamic>{}).values,
        registry: registry,
      )!;
    },
    children: children,
    dynamicKeys: dynamicParamsResult.dynamicKeys,
    id: id,
    registry: registry,
    type: type,
  );
}