toMap method

Map<String, dynamic> toMap({
  1. bool forModelJson = false,
})

Implementation

Map<String, dynamic> toMap({bool forModelJson = false}) {
  final ret = <String, dynamic>{};
  ret['id'] = id.toString();
  ret['name'] = name;
  ret['type'] = type;
  if (flags != 0) ret['flags'] = flags;
  if (indexId != null) ret['indexId'] = indexId!.toString();
  if (relationTarget != null) ret['relationTarget'] = relationTarget;
  if (!forModelJson && _dartFieldType != null) {
    ret['dartFieldType'] = _dartFieldType;
    ret['uidRequest'] = uidRequest;
  }
  return ret;
}