JsonWidgetData constructor
JsonWidgetData({
- dynamic args,
- required JsonWidgetBuilder builder(),
- JsonWidgetData? child,
- List<
JsonWidgetData> ? children, - Set<
String> ? listenVariables, - String? id,
- dynamic originalChild,
- dynamic originalChildren,
- JsonWidgetRegistry? registry,
- required String type,
Implementation
JsonWidgetData({
dynamic args,
required this.builder,
JsonWidgetData? child,
List<JsonWidgetData>? children,
Set<String>? listenVariables,
String? id,
this.originalChild,
this.originalChildren,
JsonWidgetRegistry? registry,
required this.type,
}) : assert(
child == null || children?.isNotEmpty != true,
'A JsonWidgetData may either contain a [child] or an array of [children], but not both.',
),
args = args,
children = children ?? (child == null ? null : [child]),
listenVariables = listenVariables ?? <String>{},
id = id ?? Uuid().v4(),
registry = registry ?? JsonWidgetRegistry.instance;