TF-1487 Apply linter rule

This commit is contained in:
dab246
2023-02-24 12:12:54 +07:00
committed by Dat Vu
parent 117a8a8fc6
commit 2b71aba278
155 changed files with 798 additions and 1039 deletions
+3 -16
View File
@@ -10,20 +10,7 @@
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
constant_identifier_names: false
non_constant_identifier_names: false
unnecessary_string_escapes: false
-3
View File
@@ -4,7 +4,4 @@ import 'package:model/contact/contact.dart';
class DeviceContact extends Contact implements EquatableMixin {
DeviceContact(String displayName, String email) : super(displayName, email);
@override
List<Object> get props => super.props;
}
+3 -3
View File
@@ -32,9 +32,9 @@ class Attachment with EquatableMixin {
bool hasCid() => cid != null && cid?.isNotEmpty == true;
String getDownloadUrl(String baseDownloadUrl, AccountId accountId) {
final downloadUriTemplate = UriTemplate('$baseDownloadUrl');
final downloadUriTemplate = UriTemplate(baseDownloadUrl);
final downloadUri = downloadUriTemplate.expand({
'accountId' : '${accountId.id.value}',
'accountId' : accountId.id.value,
'blobId' : '${blobId?.value}',
'name' : '$name',
'type' : '${type?.mimeType}',
@@ -68,7 +68,7 @@ extension ContentDispositionExtension on ContentDisposition {
case ContentDisposition.attachment:
return 'attachment';
case ContentDisposition.other:
return this.toString();
return toString();
}
}
}
+3 -3
View File
@@ -36,10 +36,10 @@ extension EmailContentExtension on EmailContent {
return '';
}
final firstTags = '<html><head></head><body>';
final latestTags = '</body></html>';
const firstTags = '<html><head></head><body>';
const latestTags = '</body></html>';
if (content.startsWith(firstTags) && content.endsWith(latestTags)) {
final firstIndex = firstTags.length;
const firstIndex = firstTags.length;
final latestIndex = content.length - latestTags.length;
log('EmailContentExtension::_getContentOriginal(): firstIndex: $firstIndex');
log('EmailContentExtension::_getContentOriginal(): latestIndex: $latestIndex');
+1 -1
View File
@@ -18,5 +18,5 @@ class EmailProperty {
static const String htmlBody = 'htmlBody';
static const String attachments = 'attachments';
static const String headers = 'headers';
static final String headerMdnKey = 'Disposition-Notification-To';
static const String headerMdnKey = 'Disposition-Notification-To';
}
+2 -2
View File
@@ -21,9 +21,9 @@ extension SessionExtension on Session {
Uri getUploadUri(AccountId accountId) {
final baseUrl = '${uploadUrl.origin}${uploadUrl.path}';
final uploadUriTemplate = UriTemplate('${Uri.decodeFull(baseUrl)}');
final uploadUriTemplate = UriTemplate(Uri.decodeFull(baseUrl));
final uploadUri = uploadUriTemplate.expand({
'accountId' : '${accountId.id.value}'
'accountId' : accountId.id.value
});
log('SessionExtension::getUploadUri(): uploadUri: $uploadUri');
return Uri.parse(uploadUri);
+1 -1
View File
@@ -21,7 +21,7 @@ class OIDCConfiguration with EquatableMixin {
if (authority.endsWith('/')) {
return authority + wellKnownOpenId;
} else {
return authority + '/' + wellKnownOpenId;
return '$authority/$wellKnownOpenId';
}
}
-2
View File
@@ -1,6 +1,4 @@
import 'dart:typed_data';
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart';
import 'package:mime/mime.dart';
+2 -2
View File
@@ -146,7 +146,7 @@ packages:
source: hosted
version: "4.4.0"
collection:
dependency: transitive
dependency: "direct main"
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
@@ -201,7 +201,7 @@ packages:
source: hosted
version: "2.2.4"
dartz:
dependency: transitive
dependency: "direct main"
description:
name: dartz
sha256: e6acf34ad2e31b1eb00948692468c30ab48ac8250e0f0df661e29f12dd252168
+5
View File
@@ -53,6 +53,11 @@ dependencies:
mime: 1.0.4
# flutter_test from sdk depends on collection 1.17.0
collection: 1.17.0
dartz: 0.10.1
dev_dependencies:
flutter_test:
sdk: flutter