Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer exception #45

Open
erfanegtfi opened this issue Jan 5, 2025 · 0 comments
Open

Null pointer exception #45

erfanegtfi opened this issue Jan 5, 2025 · 0 comments

Comments

@erfanegtfi
Copy link

erfanegtfi commented Jan 5, 2025

I get Null pointer exception on Sheba.dart line 53, because bank.process is null

final data = bank.process!(shebaCode);

for a sheba number of City Bank

BankInformation? call() {
   final shebaCode = _shebaCode;
   if (!isValid) return null;
   final bankCode = patternCode.firstMatch(shebaCode)?[1] ?? '';
   var bank = banksInfo[bankCode];
   if (bank == null) return null;
   if (bank.isAccountNumberAvailable) {
     final data = bank.process!(shebaCode);
     bank.accountNumber = data.accountNumber;
     bank.formattedAccountNumber = data.formattedAccountNumber;
   }
   bank.process = null;
   return bank;
 }

persian_tools: ^1.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant