Resolution.fromObject constructor

Resolution.fromObject(
  1. Map data, {
  2. String? id,
})

Implementation

factory Resolution.fromObject(Map data, {String? id}) {
  return Resolution(
    id: id ?? data['id'].toString(),
    documentTypeId: data['documentTypeId']?.toString(),
    prefix: data['prefix'],
    from: _toInt(data['from']),
    to: _toInt(data['to']),
    consecutive: _toInt(data['consecutive']),
    number: data['number'],
    dateFrom: data['dateFrom'],
    dateTo: data['dateTo'],
    technicalKey: data['technicalKey'],
    isExpired: data['isExpired'],
    //isActive: data['isActive']?.toInt(),
    createdAt: data['createdAt'],
    updatedAt: data['updatedAt'],
  );
}