From 12f2e137266cdf0b8fc01bee3395b9c6ff1af22c Mon Sep 17 00:00:00 2001 From: Payam Zahedi Date: Sun, 27 Nov 2022 13:05:15 +0330 Subject: [PATCH] feat(phone): added new phone number --- lib/src/constants/phone_number/constants.dart | 13 +++++++++++++ test/test_phone_number.dart | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/lib/src/constants/phone_number/constants.dart b/lib/src/constants/phone_number/constants.dart index 544d4e1..d978c25 100644 --- a/lib/src/constants/phone_number/constants.dart +++ b/lib/src/constants/phone_number/constants.dart @@ -100,6 +100,18 @@ const MCI = { type: SimCardType.credit, operator: Operator.MCI, ), + '995': OperatorDetail( + provinces: [], + base: 'کشوری', + type: SimCardType.credit, + operator: Operator.MCI, + ), + '996': OperatorDetail( + provinces: [], + base: 'کشوری', + type: SimCardType.credit, + operator: Operator.MCI, + ), }; const taliya = { @@ -140,6 +152,7 @@ const defaultIrancellModel = OperatorDetail( ); const irancell = { + '900': defaultIrancellModel, '930': defaultIrancellModel, '933': defaultIrancellModel, '935': defaultIrancellModel, diff --git a/test/test_phone_number.dart b/test/test_phone_number.dart index 5da6a39..d60f602 100644 --- a/test/test_phone_number.dart +++ b/test/test_phone_number.dart @@ -23,6 +23,18 @@ void main() { expect(number3?.operator?.name, 'ایرانسل'); expect(number3?.type, SimCardType.both); + final number4 = getPhoneNumberDetail('09960880440'); + + expect(number4?.base, 'کشوری'); + expect(number4?.operator?.name, 'همراه اول'); + expect(number4?.type, SimCardType.credit); + + final number5 = getPhoneNumberDetail('09000880440'); + + expect(number5?.base, 'کشوری'); + expect(number5?.operator?.name, 'ایرانسل'); + expect(number5?.type, SimCardType.both); + expect(getPhoneNumberDetail('09022002580')?.provinces?.length ?? 0, 0); /// Should return null, because it's not an iranian phone number