credit_card_type_detector | Credit Card Type Detector

A Dart package that detects credit card types based on the current credit card number patterns

Gif of the example app

Installing

  1. Add dependency to pubspec.yaml

    Get the current version in the 'Installing' tab on pub.dartlang.org

dependencies:
    credit_card_type_detector: ^1.0.0
  1. Import the package
import 'package:credit_card_type_detector/credit_card_type_detector.dart';

Usage

A basic example

import 'package:credit_card_type_detector/credit_card_type_detector.dart';


Check out the example app in the example directory or the 'Example' tab on pub.dartlang.org for a more complete example using the BLoC pattern

Features

  • No external dependencies, just makes use of dart libraries
  • Supported cards:
    • Visa
    • Mastercard
    • American Express
    • Discover

Author

Tanner Davis (Cholojuanito) - Creator and repo owner - Github Profile

License

This project is licensed under the MIT License - see the LICENSE file for more details

Libraries

credit_card_type_detector