From 1760cd046bf36165842dce7e3bb6f66dc21fc1a3 Mon Sep 17 00:00:00 2001 From: AlaaElattar Date: Wed, 6 Nov 2024 13:31:42 +0200 Subject: [PATCH] use isEmail from validators package --- app/lib/services/tools_service.dart | 4 ++-- app/pubspec.lock | 8 -------- app/pubspec.yaml | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/lib/services/tools_service.dart b/app/lib/services/tools_service.dart index 7ea55fb3..b708e099 100644 --- a/app/lib/services/tools_service.dart +++ b/app/lib/services/tools_service.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'dart:math'; import 'package:device_info_plus/device_info_plus.dart'; -import 'package:email_validator/email_validator.dart'; +import 'package:validators/validators.dart'; const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; @@ -24,7 +24,7 @@ bool validateEmail(String? value) { return false; } - return EmailValidator.validate(value); + return isEmail(value); } diff --git a/app/pubspec.lock b/app/pubspec.lock index a16526f3..36a4f938 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -369,14 +369,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - email_validator: - dependency: "direct main" - description: - name: email_validator - sha256: b19aa5d92fdd76fbc65112060c94d45ba855105a28bb6e462de7ff03b12fa1fb - url: "https://pub.dev" - source: hosted - version: "3.0.0" encrypt: dependency: transitive description: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index e731a835..809ff2dd 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -76,7 +76,6 @@ dependencies: hashlib: any stellar_flutter_sdk: ^1.8.9 flutter_launcher_icons: ^0.14.1 - email_validator: ^3.0.0 dev_dependencies: flutter_test: sdk: flutter