getWidgetBuilder method
Returns the builder for the requested type
. This will first search the
registered custom builders, then if no builder is found, this will then
search the library provided builders.
If no builder is registered for the given type
then this will throw an
Exception.
Implementation
JsonWidgetBuilderBuilder getWidgetBuilder(String type) {
var container = _builders[type];
var builder = container?.builder ?? _parent?.getWidgetBuilder(type);
if (builder == null) {
throw Exception(
'No widget with type: "$type" found in the registry [$debugLabel].');
}
return builder;
}