Package selection guidance compiled from public package information, community data, and project usage.
Awesome Card is a Flutter package that enables developers to easily create visually appealing credit card widgets within their applications. It provides a customizable and responsive card UI, ideal for payment forms, checkout screens, or financial apps. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent design across devices. With intuitive configuration options, it simplifies the integration of card input fields and styling. Perfect for apps requiring secure and attractive card display components.
Use cases
Payment form interfaces
Checkout screens
Financial application dashboards
Card management features
User profile card displays
Key features
Customizable card design
Responsive layout across platforms
Easy integration with form inputs
Supports multiple operating systems
Built-in card number formatting
Suitable for
Flutter developers building payment apps
UI designers needing card components
Apps requiring cross-platform card UIs
Developers focused on clean payment experiences
Considerations
Does not include full payment processing
Requires manual handling of sensitive data
Not intended for production payment gateways
Best used alongside security best practices
Limited to UI rendering, not transaction logic
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Awesome Card
A Flutter package to create a beautiful, animated Credit Card widget in your application.
Stay tuned for the latest updates:
✨ Features
💳 Realistic credit card widget with front and back sides
🔄 Smooth 3D flip animation between front and back
🔍 Automatic card brand detection from the number (Visa, Mastercard, Amex, RuPay, Elo, Discover, Diners Club, JCB, Maestro)
🎭 Automatic number masking per brand (e.g. Amex XXXX XXXXXX XXXXX)
🎨 Customizable backgrounds, text styles, labels, and fully custom layouts
📏 Responsive — content scales down gracefully on narrow cards instead of overflowing
📳 Optional contactless indicator and card shadow
📱 Screenshots
⚙️ Installation
Add the dependency to your pubspec.yaml:
dependencies:awesome_card:^1.2.0
Requires Dart 3 / Flutter 3.10 or newer.
Then import it in your Dart file:
import'package:awesome_card/awesome_card.dart';
🚀 Quick start
The only required parameters are the two backgrounds — everything else has
sensible defaults:
Every text field's style can be overridden. Each style is merged over the
default, so a partial override (e.g. only fontSize) keeps the default
font, weight, and color for everything else:
Text colors default to frontTextColor (white) on the front and
backTextColor (black) on the back.
Backgrounds
Any widget works as a card background — a Container, gradient, or image:
// Built-in solid backgrounds
frontBackground: CardBackgrounds.black,
backBackground: CardBackgrounds.white,
// Solid color from a hex value
frontBackground: CardBackgrounds.custom(0xff1b447b),
// Anything else — e.g. a gradient
frontBackground: Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [Colors.indigo, Colors.blueAccent]),
),
),
Fully custom layouts
To replace the entire front or back content (e.g. to center the card number
or add extra elements), pass your own widget — it is stacked on top of the
background and receives the full card area:
When cardType is not provided, the brand is detected from cardNumber and
the matching icon and number mask are applied automatically. Supported brands:
Brand
Example prefixes
Visa
4
Mastercard
51–55, 2221–2720
American Express
34, 37
RuPay
60, 6521, 6522
Elo
401178, 431274, 6362, 6516, 6550, …
Discover
6011, 65, 644–649
Diners Club
300–305, 36, 38
JCB
35, 2131, 1800
Maestro
50, 56–69
The detection helpers are exported and can be used standalone:
To force a specific brand regardless of the number, pass cardType. To force
a specific mask, pass mask.
Custom brands
Brands the package doesn't ship (regional or store cards) can be registered
via customBrands. They are checked before the built-in detection and
support their own icon and optional number mask: