TF-1487 Apply linter rule
This commit is contained in:
+2
-2
@@ -13,9 +13,9 @@ class CompositeNameValidator extends Validator<NewNameRequest> {
|
||||
CompositeNameValidator(this._listValidator);
|
||||
|
||||
@override
|
||||
Either<Failure, Success> validate(NewNameRequest newNameRequest) {
|
||||
Either<Failure, Success> validate(NewNameRequest value) {
|
||||
return _listValidator.isNotEmpty
|
||||
? _listValidator.getValidatorNameViewState(newNameRequest)
|
||||
? _listValidator.getValidatorNameViewState(value)
|
||||
: Right<Failure, Success>(VerifyNameViewState());
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -11,11 +11,11 @@ class DuplicateNameValidator extends Validator<NewNameRequest> {
|
||||
DuplicateNameValidator(this._listName);
|
||||
|
||||
@override
|
||||
Either<Failure, Success> validate(NewNameRequest newNameRequest) {
|
||||
if (newNameRequest.value != null) {
|
||||
Either<Failure, Success> validate(NewNameRequest value) {
|
||||
if (value.value != null) {
|
||||
final nameExist = _listName
|
||||
.map((nameItem) => nameItem.toLowerCase())
|
||||
.contains(newNameRequest.value!.toLowerCase());
|
||||
.contains(value.value!.toLowerCase());
|
||||
if (nameExist) {
|
||||
return Left<Failure, Success>(VerifyNameFailure(const DuplicatedNameException()));
|
||||
} else {
|
||||
|
||||
@@ -10,8 +10,8 @@ import 'package:tmail_ui_user/features/mailbox_creator/domain/state/verify_name_
|
||||
class EmailAddressValidator extends Validator<NewNameRequest> {
|
||||
|
||||
@override
|
||||
Either<Failure, Success> validate(NewNameRequest newNameRequest) {
|
||||
if (newNameRequest.value != null && GetUtils.isEmail(newNameRequest.value!)) {
|
||||
Either<Failure, Success> validate(NewNameRequest value) {
|
||||
if (value.value != null && GetUtils.isEmail(value.value!)) {
|
||||
return Right<Failure, Success>(VerifyNameViewState());
|
||||
} else {
|
||||
return Left<Failure, Success>(VerifyNameFailure(const EmailAddressInvalidException()));
|
||||
|
||||
@@ -9,8 +9,8 @@ import 'package:tmail_ui_user/features/mailbox_creator/domain/state/verify_name_
|
||||
class EmptyNameValidator extends Validator<NewNameRequest> {
|
||||
|
||||
@override
|
||||
Either<Failure, Success> validate(NewNameRequest newNameRequest) {
|
||||
if (newNameRequest.value == null || newNameRequest.value!.isEmpty) {
|
||||
Either<Failure, Success> validate(NewNameRequest value) {
|
||||
if (value.value == null || value.value!.isEmpty) {
|
||||
return Left<Failure, Success>(VerifyNameFailure(const EmptyNameException()));
|
||||
} else {
|
||||
return Right<Failure, Success>(VerifyNameViewState());
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import 'package:tmail_ui_user/features/mailbox_creator/domain/state/verify_name_
|
||||
class SpecialCharacterValidator extends Validator<NewNameRequest> {
|
||||
|
||||
@override
|
||||
Either<Failure, Success> validate(NewNameRequest newNameRequest) {
|
||||
if (newNameRequest.value != null && newNameRequest.value!.hasSpecialCharactersInName()) {
|
||||
Either<Failure, Success> validate(NewNameRequest value) {
|
||||
if (value.value != null && value.value!.hasSpecialCharactersInName()) {
|
||||
return Left<Failure, Success>(VerifyNameFailure(const SpecialCharacterException()));
|
||||
} else {
|
||||
return Right<Failure, Success>(VerifyNameViewState());
|
||||
|
||||
@@ -180,7 +180,7 @@ class MailboxCreatorView extends GetWidget<MailboxCreatorController> {
|
||||
color: AppColor.primaryColor,
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icCollapseFolder,
|
||||
color: AppColor.colorCollapseMailbox,
|
||||
colorFilter: AppColor.colorCollapseMailbox.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
onPressed: () => controller.selectMailboxLocation(context))
|
||||
])),
|
||||
|
||||
Reference in New Issue
Block a user