MModel constructor
MModel(
- Map<
String, dynamic> ? values, { - MSchemaRef? mtype,
- bool? update,
Implementation
MModel(Map<String, dynamic>? values, {MSchemaRef? mtype, bool? update})
: wrapped = values ?? <String, dynamic>{} {
if (mtype?.value.isNotNullOrBlank == true) {
if (this is MEntity) {
if (wrapped["mmeta"] == null) {
wrapped["mmeta"] = {};
}
if (wrapped["mmeta"]["mtype"] == null) {
wrapped["mmeta"]["mtype"] = mtype!.value;
}
} else {
if (wrapped["mtype"] == null) {
wrapped["mtype"] = mtype!.value;
}
}
_mtype = mtype;
}
}