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 && _targetName != null) ret['targetName'] = _targetName;
  return ret;
}