Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flutter-credit-card-input-form

the card input form package provides visually beautiful ux through animation of credit card information input form.

card input form

82177030-5bb15c80-9913-11ea-83bf-d6bfdf858f04

installing

  1. add dependency to pubspec.yaml

    get the latest version in the ‘installing’ tab on pub.dartlang.org

dependencies:
    credit_card_input_form: ^1.3.1
  1. import the package
import 'package:credit_card_input_form/credit_card_input_form.dart';
  1. adding creditcardinputform

with optional parameters

 creditcardinputform(
   cardheight: 170,
   frontcardcolor: colors.red,
   backcardcolor: colors.blueaccent,
   showresetbutton : true,
   onstatechange: (currentstate, cardinfo) {
     print(currentstate);
     print(cardinfo);
   },
   customcaptions: {...},  // translate and customize captions (see example)
),

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
89704240-1e49f180-d98d-11ea-9305-5938f0386251 89704237-1d18c480-d98d-11ea-9557-36a8519da301
final buttonstyle = 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(
    showresetbutton: true,
    onstatechange: (currentstate, cardinfo) {
      print(currentstate);
      print(cardinfo);
    },
    customcaptions: customcaptions,
    prevbuttonstyle: buttonstyle,
    nextbuttonstyle: buttonstyle,
    prevbuttontextstyle: buttontextstyle,
    nextbuttontextstyle: buttontextstyle,
    resetbuttontextstyle: buttontextstyle,
  ),

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

  • [x] add reset button

Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Top