const constructure
This commit is contained in:
@@ -26,7 +26,7 @@ class PrinterLocalDataProvider {
|
||||
|
||||
if (printerExist.hasData) {
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Printer Telah Terdaftar'),
|
||||
const PrinterFailure.dynamicErrorMessage('Printer Telah Terdaftar'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class PrinterLocalDataProvider {
|
||||
log('Error creating printer', name: _logName, error: e);
|
||||
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Error creating printer'),
|
||||
const PrinterFailure.dynamicErrorMessage('Error creating printer'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class PrinterLocalDataProvider {
|
||||
|
||||
if (updatedRows == 0) {
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Printer not found'),
|
||||
const PrinterFailure.dynamicErrorMessage('Printer not found'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class PrinterLocalDataProvider {
|
||||
log('Error updating printer', name: _logName, error: e);
|
||||
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Error updating printer'),
|
||||
const PrinterFailure.dynamicErrorMessage('Error updating printer'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class PrinterLocalDataProvider {
|
||||
|
||||
if (deletedRows == 0) {
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Printer not found'),
|
||||
const PrinterFailure.dynamicErrorMessage('Printer not found'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class PrinterLocalDataProvider {
|
||||
log('Error deleting printer', name: _logName, error: e);
|
||||
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Error deleting printer'),
|
||||
const PrinterFailure.dynamicErrorMessage('Error deleting printer'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ class PrinterLocalDataProvider {
|
||||
|
||||
if (result.isEmpty) {
|
||||
log('Printer with code $code not found');
|
||||
return DC.error(PrinterFailure.empty());
|
||||
return DC.error(const PrinterFailure.empty());
|
||||
}
|
||||
|
||||
final printer = PrinterDto.fromJson(result.first);
|
||||
@@ -133,7 +133,7 @@ class PrinterLocalDataProvider {
|
||||
log('findPrinterByCode', name: _logName, error: e);
|
||||
|
||||
return DC.error(
|
||||
PrinterFailure.dynamicErrorMessage('Error getting printer'),
|
||||
const PrinterFailure.dynamicErrorMessage('Error getting printer'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user