TF-1098 Apply lints for all module

This commit is contained in:
dab246
2022-10-21 13:31:33 +07:00
committed by Dat H. Pham
parent c6e73d4272
commit ae89802845
58 changed files with 442 additions and 348 deletions
@@ -2,10 +2,10 @@ import 'package:dio/dio.dart';
extension OptionsExtension on Options {
Options appendHeaders(Map<String, dynamic> additionalHeaders) {
if (this.headers != null) {
this.headers?.addAll(additionalHeaders);
if (headers != null) {
headers?.addAll(additionalHeaders);
} else {
this.headers = additionalHeaders;
headers = additionalHeaders;
}
return this;
}
@@ -75,7 +75,7 @@ class DownloadManager {
await streamController.close();
return streamController.stream.first;
} else {
throw exception;
rethrow;
}
}
return streamController.stream.first;
@@ -100,7 +100,7 @@ class DownloadManager {
html.Url.revokeObjectUrl(url);
} catch (exception) {
log('DownloadManager::createAnchorElementDownloadFileWeb(): ERROR: $exception');
throw exception;
rethrow;
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ class CompressFileUtils {
static const int MAX_IMAGE_WIDTH = 1000;
bool _exceedMaximumImageSize(Uint8List bytesData) {
final maximumSizeBytes = MAXIMUM_IMAGE_SIZE_KB * 1024;
const maximumSizeBytes = MAXIMUM_IMAGE_SIZE_KB * 1024;
final sizeBytesData = bytesData.length;
log('CompressFileUtils::exceedMaximumImageSize(): maximumSizeBytes: $maximumSizeBytes');
log('CompressFileUtils::exceedMaximumImageSize(): sizeBytesData: $sizeBytesData');