prepareLayout method

  1. @mustBeOverridden
Future<DuitView?> prepareLayout(
  1. Map<String, dynamic> json
)

Prepares and validates a layout configuration from a JSON-like map, returning a DuitView instance.

The json parameter contains the layout structure, typically representing widgets, properties, and relationships as parsed from a JSON document.

Implementations are responsible for parsing the provided structure, constructing the corresponding DuitView, and returning it for further use, such as rendering. Returning null may indicate an invalid or unrecognized layout.

Throws MissingCapabilityMethodImplementation if not overridden.

Implementation

@mustBeOverridden
Future<DuitView?> prepareLayout(Map<String, dynamic> json) =>
    throw const MissingCapabilityMethodImplementation(
      "prepareLayout",
      "ViewModelCapabilityDelegate",
    );