ofMSchemaFuture<T extends MModel> static method
Future<MSchemaForm<T> >
ofMSchemaFuture<T extends MModel>(
- BuildContext context,
- T model, {
- MSchemaRef? mtype,
- Map<
JsonPath, FormFieldValidator> ? validators,
Implementation
static Future<MSchemaForm<T>> ofMSchemaFuture<T extends MModel>(
BuildContext context,
T model, {
MSchemaRef? mtype,
Map<JsonPath, FormFieldValidator>? validators,
}) async {
assert(mtype != null);
final definition =
await context.mschemaService.getSchema(mtype ?? model.mtype);
return MSchemaForm<T>(context, model, definition.asEntitySchema(),
validators: validators);
}