addLicense method

  1. @override
void addLicense(
  1. LicenseDocument license
)
override

Implementation

@override
void addLicense(LicenseDocument license) async {
  if (await _exists(license)) {
    return;
  }
  await database.insert(
      LicensesTable.name,
      {
        LicensesTable.id: license.id,
        LicensesTable.printsleft: license.rights.print,
        LicensesTable.copiesleft: license.rights.copy,
      },
      conflictAlgorithm: ConflictAlgorithm.replace);
}