A Flutter package to easily create a Credit Card in your application.

Overview

Awesome Card

A flutter package to create a Credit Card widget in your application.


Stay tuned for the latest updates:


Pub Twitter

📱 Screenshots


⚙️ Installation

Import the following package in your dart file

import 'package:awesome_card/awesome_card.dart';

👨‍💻 Usage

Use the Awesome Card Widget

CreditCard(
    cardNumber: "5450 7879 4864 7854",
    cardExpiry: "10/25",
    cardHolderName: "Card Holder",
    cvv: "456",
    bankName: "Axis Bank",
    cardType: CardType.masterCard, // Optional if you want to override Card Type
    showBackSide: false,
    frontBackground: CardBackgrounds.black,
    backBackground: CardBackgrounds.white,
    showShadow: true,
    textExpDate: 'Exp. Date',
    textName: 'Name',
    textExpiry: 'MM/YY'
),

For more detail on usage, check out the example provided.

🙍🏻‍♂️ Author

📄 License

Awesome Card is released under the MIT license. See LICENSE for details.

Comments
  • Right overflowed by 4.0 pixels

    Right overflowed by 4.0 pixels

    screenshot-1587505000838 getting this error how to resolve this. Here is the code return Scaffold( appBar: AppBar( backgroundColor: Colors.indigo, title: Text("Saved Cards"), ), body: Builder(builder: (BuildContext context) { return Column( // mainAxisAlignment: MainAxisAlignment.end, children: [ CreditCard( cardNumber: "5450 7879 4864 7854", cardExpiry: "10/25", cardHolderName: "Mohammad Hamza Gaya", cvv: "456", bankName: "Axis Bank", showBackSide: false, frontBackground: CardBackgrounds.black, backBackground: CardBackgrounds.black, showShadow: false, ), Padding( padding: const EdgeInsets.all(8.0), child: Container( color: Colors.indigo, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: FlatButton( onPressed: () { Navigator.pushNamed(context, '/addNewCard'); }, child: Text( "Add New Card", style: TextStyle(fontSize: 18, color: Colors.white), )), ), ], )), ), ], ); }), );

    opened by Mohammadhamza43 5
  • CVV Render overflowed 40 px

    CVV Render overflowed 40 px

    to solve this just edit the file card_back_layout.dart and modify the return with this.

    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.start,
      children: <Widget>[
        SizedBox(
          height: 30,
        ),
        Expanded(
          child: Container(
            color: Colors.black,
            height: 50,
          ),
        ),
        SizedBox(
          height: 20,
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Expanded(
              child: Container(
                color: Colors.grey,
                height: 50,
              ),
              flex: 3,
            ),
            Expanded(
                flex: 1,
                child: Center(
                  child: Text(
                    cvv.toString(),
                    style: TextStyle(
                        fontSize: 21,
                        fontWeight: FontWeight.w500,
                        color: Colors.black
                    ),
                  ),
                )
            ),
          ],
        ),
    
        SizedBox(
          height: 40,
        ),
      ],
    );
    

    it is responsive, please apply y the next update.

    regards

    opened by malopezr7 4
  • Manually add card brand

    Manually add card brand

    Hi,

    First of all thank you for the widget. In my use case I am using stripe to store the card info, so on the front end stripe will only return the last 4 digits of the card, so by that method I cannot get card brand to show in this widget.

    However stripe, returns the card brand (i.e. Visa, Master Card etc). So would be great if you can add a field in your card initialiser that allows us to manually add a card brand.

    Thanks!

    opened by assad62 3
  • null-safety

    null-safety

    Do you plan to update to null-safety ? Thank you

    howing dependencies that are currently not opted in to null-safety. [✗] indicates versions without null safety support. [✓] indicates versions opting in to null safety.

    Package Name Current Upgradable Resolvable Latest

    direct dependencies: awesome_card ✗1.1.0 ✗1.1.0 ✗1.1.0 ✗1.1.0
    You are already using the newest resolvable versions listed in the 'Resolvable' column. Newer versions, listed in 'Latest', may not be mutually compatible.

    opened by Cyphontin 1
  • overflow fix

    overflow fix

    fix card number overflow

    class CardFrontLayout {
      String bankName;
      String cardNumber;
      String cardExpiry;
      String cardHolderName;
      Widget cardTypeIcon;
      double cardWidth;
      double cardHeight;
      Color textColor;
    
      CardFrontLayout(
          {this.bankName = "",
          this.cardNumber = "",
          this.cardExpiry = "",
          this.cardHolderName = "",
          this.cardTypeIcon,
          this.cardWidth = 0,
          this.cardHeight = 0,
          this.textColor});
    
      Widget layout1() {
        return Padding(
          padding: const EdgeInsets.fromLTRB(20, 8, 20, 20),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              SizedBox(
                height: 8,
              ),
              Row(
                mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Container(
                    height: 30,
                    child: Center(
                      child: Text(
                        bankName,
                        style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500),
                      ),
                    ),
                  ),
                  Expanded(
                    child: Align(
                      alignment: Alignment.centerRight,
                      child: new Image.asset(
                        'images/contactless_icon.png',
                        fit: BoxFit.fitHeight,
                        width: 30.0,
                        height: 30.0,
                        color: textColor,
                        package: 'awesome_card',
                      ),
                    ),
                  ),
                ],
              ),
              Expanded(
                child: Align(
                  alignment: Alignment.bottomLeft,
                  child: Container(
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: <Widget>[
                       /////////////////////////////////// fix here ///////////////////////////////////////
                        Expanded(
                          child: Column(
                            mainAxisSize: MainAxisSize.min,
                            mainAxisAlignment: MainAxisAlignment.end,
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: <Widget>[
                              Align(
                                alignment: Alignment.centerLeft,
                                child: FittedBox(
                                  fit: BoxFit.fitWidth,
                                  child: Text(
                                    cardNumber == null || cardNumber.isEmpty ? 'XXXX XXXX XXXX XXXX' : cardNumber,
                                    style: TextStyle(
                                      package: 'awesome_card',
                                      color: textColor,
                                      fontWeight: FontWeight.w500,
                                      fontFamily: "MavenPro",
                                      fontSize: 20,
                                    ),
                                    maxLines: 1,
                                    overflow: TextOverflow.fade,
                                  ),
                                ),
                              ),
                              SizedBox(
                                height: 15,
                              ),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.start,
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: <Widget>[
                                  Text(
                                    "Exp. Date",
                                    style: TextStyle(
                                        package: 'awesome_card', color: textColor, fontFamily: "MavenPro", fontSize: 15),
                                  ),
                                  SizedBox(
                                    width: 10,
                                  ),
                                  Text(
                                    cardExpiry == null || cardExpiry.isEmpty ? "MM/YY" : cardExpiry,
                                    style: TextStyle(
                                        package: 'awesome_card',
                                        color: textColor,
                                        fontWeight: FontWeight.w500,
                                        fontFamily: "MavenPro",
                                        fontSize: 16),
                                  ),
                                ],
                              ),
                              SizedBox(
                                height: 15,
                              ),
                              Text(
                                cardHolderName == null || cardHolderName.isEmpty ? "Card Holder" : cardHolderName,
                                style: TextStyle(
                                    package: 'awesome_card',
                                    color: textColor,
                                    fontWeight: FontWeight.w500,
                                    fontFamily: "MavenPro",
                                    fontSize: 17),
                              ),
                            ],
                          ),
                        ),
                        cardTypeIcon
                      ],
                    ),
                  ),
                ),
              ),
            ],
          ),
        );
      }
    }
    
    
    opened by TomVista 1
  • Too much size for the form

    Too much size for the form

    Displaying the card, the form with 4 lines and the keyboard takes too much place on a normal screen. Do you plan to provide a more compact layout of the form on 1 on 2 lines maximum ? 1 line form layout: https://stripe.com/docs/stripe-js

    opened by fvisticot 1
  • Could not resolve org.antlr:antlr4:4.5.3.

    Could not resolve org.antlr:antlr4:4.5.3.

    Hi, I clone this AwesomeCard flutter project. An exception occured when running. seel below:

    FAILURE: Build failed with an exception.

    • What went wrong: A problem occurred configuring root project 'android'.

    Could not resolve all artifacts for configuration ':classpath'. Could not resolve org.antlr:antlr4:4.5.3. Required by: project : > com.android.tools.build:gradle:3.2.1 > androidx.databinding:databinding-compiler-common:3.2.1 > Could not resolve org.antlr:antlr4:4.5.3. > Could not parse POM https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom > Could not resolve org.antlr:antlr4-master:4.5.3. > Could not resolve org.antlr:antlr4-master:4.5.3. > Could not parse POM https://jcenter.bintray.com/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom > Could not resolve org.sonatype.oss:oss-parent:9. > Could not resolve org.sonatype.oss:oss-parent:9. > Could not get resource 'https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom'. > Could not GET 'https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom'. > Read timed out Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71. Required by: project : > com.android.tools.build:gradle:3.2.1 > org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71 > Skipped due to earlier error Could not resolve net.sf.proguard:proguard-base:6.0.3. Required by: project : > com.android.tools.build:gradle:3.2.1 > net.sf.proguard:proguard-gradle:6.0.3 > Skipped due to earlier error Could not resolve com.google.auto.value:auto-value:1.5.2. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:bundletool:0.5.0 > Skipped due to earlier error Could not resolve com.google.errorprone:error_prone_annotations:2.2.0. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:bundletool:0.5.0 > Skipped due to earlier error Could not resolve com.google.protobuf:protobuf-java:3.4.0. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:bundletool:0.5.0 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdk-common:26.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools.analytics-library:protos:26.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools.analytics-library:tracker:26.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:bundletool:0.5.0 > com.android.tools.build:aapt2-proto:0.3.1 > Skipped due to earlier error Could not resolve com.google.protobuf:protobuf-java-util:3.4.0. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:bundletool:0.5.0 > Skipped due to earlier error Could not resolve org.jdom:jdom2:2.0.6. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-alpha10 > Skipped due to earlier error Could not resolve org.jetbrains.kotlin:kotlin-stdlib-common:1.2.71. Required by: project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 > org.jetbrains.kotlin:kotlin-stdlib:1.2.71 > Skipped due to earlier error Could not resolve org.jetbrains:annotations:13.0. Required by: project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 > org.jetbrains.kotlin:kotlin-stdlib:1.2.71 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 > com.android.tools.layoutlib:layoutlib-api:26.2.1 > Skipped due to earlier error Could not resolve org.jetbrains.kotlin:kotlin-script-runtime:1.2.71. Required by: project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 > org.jetbrains.kotlin:kotlin-compiler-embeddable:1.2.71 > Skipped due to earlier error Could not resolve org.jetbrains.kotlin:kotlin-build-common:1.2.71. Required by: project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 > org.jetbrains.kotlin:kotlin-compiler-runner:1.2.71 > Skipped due to earlier error Could not resolve org.jetbrains.kotlin:kotlin-daemon-client:1.2.71. Required by: project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 > org.jetbrains.kotlin:kotlin-compiler-runner:1.2.71 > Skipped due to earlier error Could not resolve org.apache.commons:commons-compress:1.12. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 > com.android.tools:repository:26.2.1 > Skipped due to earlier error Could not resolve javax.inject:javax.inject:1. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdk-common:26.2.1 > Skipped due to earlier error Could not resolve net.sf.kxml:kxml2:2.3.0. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools.build:manifest-merger:26.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools.ddms:ddmlib:26.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 > com.android.tools.layoutlib:layoutlib-api:26.2.1 > Skipped due to earlier error Could not resolve com.google.code.findbugs:jsr305:1.3.9. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools.build:apkzlib:3.2.1 project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.analytics-library:shared:26.2.1 > com.google.guava:guava:23.0 > Skipped due to earlier error Could not resolve com.google.errorprone:error_prone_annotations:2.2.0. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.analytics-library:shared:26.2.1 > com.google.guava:guava:23.0 > Skipped due to earlier error Could not resolve com.google.j2objc:j2objc-annotations:1.1. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.analytics-library:shared:26.2.1 > com.google.guava:guava:23.0 > Skipped due to earlier error Could not resolve org.codehaus.mojo:animal-sniffer-annotations:1.14. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.analytics-library:shared:26.2.1 > com.google.guava:guava:23.0 > Skipped due to earlier error Could not resolve commons-logging:commons-logging:1.2. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.analytics-library:crash:26.2.1 > org.apache.httpcomponents:httpclient:4.5.2 > Skipped due to earlier error Could not resolve commons-codec:commons-codec:1.9. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.analytics-library:crash:26.2.1 > org.apache.httpcomponents:httpclient:4.5.2 > Skipped due to earlier error Could not resolve com.sun.activation:javax.activation:1.2.0. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 > com.android.tools:repository:26.2.1 > Skipped due to earlier error Could not resolve org.glassfish.jaxb:jaxb-runtime:2.2.11. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 > com.android.tools:repository:26.2.1 > Skipped due to earlier error Could not resolve com.google.jimfs:jimfs:1.1. Required by: project : > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools:sdklib:26.2.1 > com.android.tools:repository:26.2.1 > Skipped due to earlier error

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 5m 20s Finished with error: Gradle task assembleDebug failed with exit code 1

    I can not figure it out. I dont know if this occurred to you. thank you.

    opened by iamwutianbao 0
  • Custom card number and holder name text style

    Custom card number and holder name text style

    Hello!

    Thanks a lot for this very useful package! I am trying to use it on a mobile banking app and would like to customize text (text size especially). What about adding new features according to card's text customization

    Regards

    opened by lambou 2
Owner
Vivek Kaushik
Mobile App Developer.
Vivek Kaushik
Flutter Credit Card Input form

This package provides visually beautiful UX through animation of credit card information input form. Preview Installing Add dependency to pubspec.yaml

Jeongtae Kim 426 Jan 5, 2023
Credit Card UI For Flutter

TP1 FLUTTER CREDIT CARD UI FIRST step : must enter the number of credit card then the expired date SECONDE step : you enter the CVV in the back of the

null 0 Nov 8, 2021
Flutter-business-card-app - Flutter + Dart business card mobile app

Dart + Flutter Business Card Mobile Application

Mark Hellner 1 Nov 8, 2022
ID-Card - A Simple ID Card Project Using Flutter

ID-CARD A new Flutter project.A simple demonstration of my time in the Dart lang

edwromero 0 Jan 26, 2022
A flutter package for building card based forms.

Card Settings NOTE: THIS IS EFFECTIVELY NULLSAFE BUT CANNOT REFLECT THIS UNTIL cupertino_settings IS UPGRADED. A flutter package for building settings

CodeGrue 445 Dec 26, 2022
Flutter package - Animated Flip Card

Animated Flip Card Animated Flip Card package lets you add an animated flip card to your Flutter app that hide and show more informations. Features Th

Ulfhrafn 8 Dec 4, 2022
A flutter port of Cardidy, a package to validate or identify card numbers & cvv with ease.

Flutter Cardidy A plugin to validate or identify card numbers & cvv with ease. This flutter package will help you validate card numbers or CVVs and id

Heyramb Narayan Goyal 1 Nov 28, 2021
A simple package that provides you with some widgets and cutom clippers which implements the shape of a coupon card.

Coupon UI Kit A simple package that provides you with some widgets and cutom clippers which implements the shape of a coupon card. The example contain

AbdulMuaz Aqeel 15 Dec 20, 2022
Flutterwave landing page animated card deck implemented with Flutter

The Flutterwave animated card deck in Flutterwave's landing page implemented with Flutter.

null 38 Nov 10, 2022
This is my card using flutter

Mi Card Our Goal Now that you've seen how to create a Flutter app entirely from scratch, we're going to go further and learn more about how to design

Joshua Uzor 5 Dec 18, 2021
Flutter - Special animated flip card

special_card Flutter UI Design | Animated Flip Card. Demo for the app: animated-flip-card.mp4 Getting Started This project is a starting point for a F

Ulfhrafn 2 Dec 4, 2022
Flutter Card Management App(UI/UX)

Flutter Card Managing App - Cardy Bank I uploaded on youtube!! Thanks to Watch Introduction I'm working on a project to launch a simple brand. I tried

Lomio 8 Oct 31, 2022
Mi-card-app flutter project

my_card_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

null 1 Dec 2, 2021
A flutter widget where a card is expanded ontap.

Expansion card This package provides an easy implementation of a Expansion type card where you can also add gif at the background. How to use import '

null 127 Dec 6, 2022
Find out under which card the Flutter logo is hiding.

Flutter Card Flip Game Find out under which card the Flutter logo is hiding. Game Rules The purpose of this game is for the player to find out under w

Nickolas Chong 0 Dec 30, 2021
Scratch card widget which temporarily hides content from user.

scratcher Scratch card widget which temporarily hides content from user. Features Android and iOS support Cover content with full color or custom imag

Kamil Rykowski 405 Dec 27, 2022
This is simple Ninja ID Card App Code ;)

ninjacard A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Saini Madhu 4 Oct 17, 2022
This package provides some widgets you can use to create a smooshy UI.

Dough Library Squishy widgets for Flutter. Quick Links Dough Demos Here are a few samples of the different widgets provided by this repo. You can find

Josiah Saunders 530 Dec 23, 2022
A flutter plugin for Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple.

A flutter plugin for Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple.

Urmish Patel 191 Dec 29, 2022