Search packages, repositories and app categories

Package detailsv0.1.8

credit_card

Functional yet beautiful Credit Card Widget with automatic card type detection.

30-day downloads
84
Likes
28
Pub points
30

Install package

flutter pub add credit_card

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A functional and visually appealing credit card widget that automatically detects card type based on input. Designed for seamless integration into Flutter apps, it enhances user experience with real-time validation and dynamic styling. The widget supports major card networks and provides a clean, modern interface ideal for payment forms. It is lightweight and easy to implement, making it suitable for e-commerce, finance, or any app requiring secure card input.

Use cases

  • Payment form integration
  • E-commerce checkout flows
  • Digital wallet interfaces
  • Card number validation
  • User-friendly card input UI
  • Secure payment data collection

Key features

  • Automatic card type detection
  • Real-time input validation
  • Support for major card networks
  • Beautiful, customizable design
  • Lightweight and easy to integrate
  • Responsive card display

Suitable for

  • Flutter developers building payment systems
  • Apps requiring secure card input
  • UI-focused financial applications
  • Mobile e-commerce platforms
  • Design-driven payment interfaces

Considerations

  • Does not handle actual payment processing
  • Requires additional security measures for sensitive data
  • Limited to UI/UX aspects of card handling
  • No built-in encryption or tokenization
  • Not intended for production payment gateways
  • Manual implementation needed for compliance

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Credit Card

A Flutter package allows you to easily implement the Credit card's UI easily with the Card detection.

Codacy Badge

Preview

The example app running in Android

Installing

  1. Add dependency to pubspec.yaml

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

dependencies:
    credit_card: 0.1.6
  1. Import the package
import 'package:credit_card/flutter_credit_card.dart';
  1. Adding CreditCardWidget

With required parameters


    CreditCardWidget(
        cardNumber: cardNumber,
        expiryDate: expiryDate, 
        cardHolderName: cardHolderName,
        cvvCode: cvvCode,
        showBackView: isCvvFocused, //true when you want to show cvv(back) view
    ),

With optional parameters

    CreditCardWidget(
        cardNumber: cardNumber,
        expiryDate: expiryDate,
        cardHolderName: cardHolderName,
        cvvCode: cvvCode,
        showBackView: isCvvFocused,
        cardbgColor: Colors.black,
        height: 175,
        textStyle: TextStyle(color: Colors.yellowAccent),
        width: MediaQuery.of(context).size.width,
        animationDuration: Duration(milliseconds: 1000),
        ),
  1. Adding CreditCardForm
    CreditCardForm(
      themeColor: Colors.red,
      onCreditCardModelChange: (CreditCardModel data) {},
    ),

How to use

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

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Credit

This package's animation is inspired from from this Dribbble art. This package is basend on flutter_credit_card.

Categories

Source repository

Projects using this package

No data available yet.