• Stars
    star
    493
  • Rank 87,336 (Top 2 %)
  • Language
    Dart
  • License
    BSD 2-Clause "Sim...
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flutter Credit Card Input form

This package provides visually beautiful UX through animation of credit card information input form.

Preview

Installing

  1. Add dependency to pubspec.yaml

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

dependencies:
    credit_card_input_form: ^2.3.0
  1. Import the package
import 'package:credit_card_input_form/credit_card_input_form.dart';
  1. Adding CreditCardInputForm

With optional parameters

 CreditCardInputForm(
   cardHeight: 170,
   showResetButton : true,
   onStateChange: (currentState, cardInfo) {
     print(currentState);
     print(cardInfo);
   },
   customCaptions: {...}, 
   frontCardDecoration: cardDecoration,
   backCardDecoration: cardDecoration,
   prevButtonDecoration: buttonStyle,
   nextButtonDecoration: buttonStyle,
   resetButtonDecoration : buttonStyle,
   prevButtonTextStyle: buttonTextStyle,
   nextButtonTextStyle: buttonTextStyle,
   resetButtonTextStyle: buttonTextStyle,
   initialAutoFocus: true, // optional

),

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.

New Feature

v1.3.0

added custom button style feature

Default Custom
default custom
final buttonDecoration = BoxDecoration(
    borderRadius: BorderRadius.circular(30.0),
    gradient: LinearGradient(
        colors: [
          const Color(0xfffcdf8a),
          const Color(0xfff38381),
        ],
        begin: const FractionalOffset(0.0, 0.0),
        end: const FractionalOffset(1.0, 0.0),
        stops: [0.0, 1.0],
        tileMode: TileMode.clamp),
  );

  final buttonTextStyle =
      TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18);

  CreditCardInputForm(
    prevButtonDecoration: buttonDecoration,
    nextButtonDecoration: buttonDecoration,
    prevButtonTextStyle: buttonTextStyle,
    nextButtonTextStyle: buttonTextStyle,
    resetButtonTextStyle: buttonTextStyle,
  ),

v2.0.0

It provides more options using boxdecoration that can only change the color of the card.

Default Custom
image image
  final cardDecoration = BoxDecoration(
    boxShadow: <BoxShadow>[
      BoxShadow(color: Colors.black54, blurRadius: 15.0, offset: Offset(0, 8))
    ],
    gradient: LinearGradient(
        colors: [
          Colors.red,
          Colors.blue,
        ],
        begin: const FractionalOffset(0.0, 0.0),
        end: const FractionalOffset(1.0, 0.0),
        stops: [0.0, 1.0],
        tileMode: TileMode.clamp),
    borderRadius: BorderRadius.all(Radius.circular(15)));


    CreditCardInputForm(
      frontCardDecoration: cardDecoration,
      backCardDecoration: cardDecoration,
    ),
  ]),

v2.1.0

implement a new feature to add an initial value when creating a widget

Code Preview
CreditCardInputForm(
  ....
  cardCVV: '222',
  cardName: 'Jeongtae Kim',
  cardNumber: '1111111111111111',
  cardValid: '12/12',
  intialCardState: InputState.DONE,
),

ezgif com-gif-maker

v2.2.0

Add initialAutoFocus parameter

3rd party library

Flip card

https://pub.dev/packages/flip_card

For use card flip animation

Provider

https://pub.dev/packages/provider

For use state management

Reference

This package's animation is inspired from from this Dribbble art

TODO List

  • add RESET button
  • add box decoration param

More Repositories

1

Vertical_Card_Pager

Use dynamic and beautiful card view pagers to help you create great apps.
Dart
95
star
2

Flutter-Movist

Show movie & crews information through network. made by flutter
Dart
81
star
3

Horizontal_Card_Pager

Use dynamic and beautiful card view pagers (horizontal direction) to help you create great apps.
Dart
32
star
4

Naver-Green-Dot-Widget

Dart
10
star
5

mobile-declarative-pokedex-app

Pokedex App by Mobile Declarative UI Pattern
10
star
6

compose_instagram_clone

Instagram clone by Android compose
Kotlin
7
star
7

Flutter_Vertical_ViewPager

Dart
7
star
8

android-compose-pokedex

Android Pokedex app sample made by Compose
Kotlin
5
star
9

Flutter_AWS_Cognito_Sample_App

Test Flutter AWS-Cognito sample
Dart
4
star
10

flutter_currency_exchange

Flutter์„ ์ด์šฉํ•˜์—ฌ ํ™˜์ „ ์•ฑ ๋งŒ๋“ค๊ธฐ
Dart
3
star
11

origogi.github.io

HTML
3
star
12

ios-swiftui-pokedex

ios swiftui pokedex
Swift
3
star
13

FindCafeteria

์ฃผ์œ„ ๋ฌด๋ฃŒ ๊ธ‰์‹์†Œ๋ฅผ ์กฐํšŒํ• ์ˆ˜ ์žˆ๋Š” Android app
Java
3
star
14

Flutter-eCommerce-App-Sample

Dart
2
star
15

Andoid-Compose-Test-App

Android Compose ์‹ค์Šต์•ฑ์ž…๋‹ˆ๋‹ค.
Kotlin
1
star
16

Flutter-Firebase-Chat

Flutter Firebase Chat
Dart
1
star
17

flutter-ui-challenge-samsungpay

์‚ผ์„ฑํŽ˜์ด ์นด๋“œ๋ทฐ ๋งŒ๋“ค์–ด๋ณด๊ธฐ
C++
1
star
18

origogi-homepage

ํ™ˆํŽ˜์ด์ง€ ํด๋ก  ์ฝ”๋”ฉ
JavaScript
1
star
19

Android-Rx-MVVM_Gallery-App

MVVM๊ณผ RxAndroid๋ฅผ ํ™œ์šฉํ•œ Android ๊ฐค๋Ÿฌ๋ฆฌ ์•ฑ
Kotlin
1
star
20

LolLogs

Kotlin
1
star