buildFromString method
Widget
buildFromString(
- String jsonString, {
- required ActionHandler actionHandler,
- Map<
String, dynamic> ? bindingContext, - StateAdapter? stateAdapter,
Parse JSON string and build widget tree.
Implementation
Widget buildFromString(
String jsonString, {
required ActionHandler actionHandler,
Map<String, dynamic>? bindingContext,
StateAdapter? stateAdapter,
}) {
final decoded = jsonDecode(jsonString) as Map<String, dynamic>?;
if (decoded == null) {
throw JsonParserException('Root JSON must be an object');
}
return buildFromMap(
decoded,
actionHandler: actionHandler,
bindingContext: bindingContext,
stateAdapter: stateAdapter,
);
}