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;
  if (_targetId != null) ret['targetId'] = _targetId.toString();
  if (!forModelJson) {
    ret['targetName'] = _targetName;
    ret['uidRequest'] = uidRequest;
  }
  return ret;
}