bd_sim_validator 1.0.5 copy "bd_sim_validator: ^1.0.5" to clipboard
bd_sim_validator: ^1.0.5 copied to clipboard

A Dart package to validate and detect operators of Bangladeshi phone numbers. Supports GP, Robi, Banglalink, Teletalk, and Airtel.

example/main.dart

import 'package:bd_sim_validator/bd_sim_validator.dart';

void main() {
  // ── Validate ──────────────────────────────────────
  print(BDPhoneValidator.isValid('01711111111'));  // true
  print(BDPhoneValidator.isValid('12345'));         // false

  // ── Detect Operator ───────────────────────────────
  print(OperatorDetector.detect('01711111111'));   // grameenphone
  print(OperatorDetector.detect('01911111111'));   // banglalink
  print(OperatorDetector.detect('01511111111'));   // teletalk
  print(OperatorDetector.detect('01611111111'));   // robi

  // ── Format ────────────────────────────────────────
  print(BDPhoneFormatter.toInternational('01711111111')); // +8801711111111
  print(BDPhoneFormatter.toLocal('+8801711111111'));       // 01711111111
}
3
likes
160
points
38
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package to validate and detect operators of Bangladeshi phone numbers. Supports GP, Robi, Banglalink, Teletalk, and Airtel.

Homepage

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bd_sim_validator