MetaFormResult.single constructor

MetaFormResult.single({
  1. required IMSchemaDefinition definition,
  2. JsonPath basePath = JsonPath.Root,
  3. required JsonPath single,
})

Implementation

MetaFormResult.single(
    {required this.definition,
    this.basePath = JsonPath.Root,
    required JsonPath single})
    : pending = {
        single: definition.properties!
                .where((prop) => prop.jsonPath == single)
                .firstOrNull ??
            nullPointer(
                "No single result found for $single (base $basePath), but found "
                "${definition.properties!.map(
              (p) => p.path,
            )}")
      };