null
Find a file
2025-05-30 00:46:01 +03:30
assets Update demo image for improved visual representation in the project. 2025-05-29 22:51:08 +03:30
example Update CHANGELOG and version to 0.0.3. Added CVV text style customization, fixed deprecated withOpacity usage, and improved text scaling for smaller screens. 2025-05-30 00:46:01 +03:30
lib Refactor BankCardWidget to support optional CVV display and improve layout scaling for responsiveness. Updated BankCardStyle to include CVV text style and adjusted card rendering logic for better visual consistency. 2025-05-30 00:45:14 +03:30
.gitignore init 2025-05-29 22:27:38 +03:30
.pubignore Initial commit of bank_card_widget package, including core widget implementation, customizable styles, example app, and necessary configuration files. 2025-05-29 22:37:03 +03:30
CHANGELOG.md Update CHANGELOG and version to 0.0.3. Added CVV text style customization, fixed deprecated withOpacity usage, and improved text scaling for smaller screens. 2025-05-30 00:46:01 +03:30
LICENSE Initial commit of bank_card_widget package, including core widget implementation, customizable styles, example app, and necessary configuration files. 2025-05-29 22:37:03 +03:30
pubspec.yaml Update CHANGELOG and version to 0.0.3. Added CVV text style customization, fixed deprecated withOpacity usage, and improved text scaling for smaller screens. 2025-05-30 00:46:01 +03:30
README.md Update version to 0.0.2, enhance README with live demo link, and update CHANGELOG for new release. 2025-05-29 22:46:35 +03:30

Bank Card Widget

A customizable and reusable bank card widget for Flutter with various styling options.

pub package

Live Demo

Screenshots

Demo Cards

Features

  • Customizable Appearance - Easily customize colors, fonts, and layout.
  • Responsive Design - Adapts to different screen sizes (Note: Current implementation uses fixed size, will be improved).
  • Flexible Styling - Use the BankCardStyle class for comprehensive styling.

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  bank_card_widget: any

Then run:

flutter pub get

Usage

Basic Usage

import 'package:bank_card_widget/bank_card_widget.dart';

BankCardWidget(
  cardNumber: '1234 5678 9010 1234',
  cardHolderName: 'JOHN DOE',
  expiryDate: '12/24',
  cvv: '123',
  cardColor: Colors.blue.shade700,
  textColor: Colors.white,
)

Using Modal Bottom Sheet

import 'package:bank_card_widget/bank_card_widget.dart';

void _showBankCard() {
  showBankCardWidget(
    context: context,
    cardNumber: '1234 5678 9010 1234',
    cardHolderName: 'JOHN DOE',
    expiryDate: '12/24',
    cvv: '123',
    cardColor: Theme.of(context).brightness == Brightness.dark ? Colors.black87 : Colors.blue.shade700,
    textColor: Colors.white,
  );
}

Custom Styling

import 'package:bank_card_widget/bank_card_widget.dart';

BankCardWidget(
  cardNumber: '5678 1234 9010 1234',
  cardHolderName: 'JANE SMITH',
  expiryDate: '10/25',
  cvv: '456',
  cardColor: Colors.green.shade700,
  textColor: Colors.white,
  style: BankCardStyle(
    cornerRadius: 10.0,
    cardNumberTextStyle: TextStyle(
      fontSize: 22,
      fontWeight: FontWeight.normal,
      letterSpacing: 3.0,
      color: Colors.yellowAccent,
    ),
  ),
)

See the example app for more styling options.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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