搜尋套件、儲存庫與 APP 分類

credit_card_input_form 封面
套件詳情v2.3.0

credit_card_input_form

此套件透過動畫化信用卡資訊輸入表單,提供視覺上優美的使用者體驗。

AndroidiOS
近 30 天下載
138
喜歡數
62
Pub 分數
110

安裝套件

flutter pub add credit_card_input_form

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,提供美觀且具動畫效果的信用卡輸入表單,提升付款資料輸入時的使用者體驗。它具備順暢的動畫與即時視覺反饋,使用者輸入卡片資訊時可獲得即時回應,提升參與度並減少輸入錯誤。設計上遵循現代 UI 原則,支援 Android 與 iOS 平台,開箱即用即可呈現精緻外觀。此套件非常適合需要安全且直覺地收集卡片資訊的應用程式。

適用情境

  • 支付處理表單
  • 電子商務結帳流程
  • 行動銀行應用程式
  • 數位錢包整合
  • 使用者引導卡片設定

主要特色

  • 動畫卡號輸入
  • 即時卡類型偵測
  • 流暢的視覺過渡
  • 適用於所有螢幕尺寸的響應式設計
  • 內建佔位符動畫

適合對象

  • 尋求精緻支付介面的開發者
  • 專注於金融工作流程使用者體驗的應用程式
  • 需要最少設定即可輸入卡片的項目

使用建議

  • 不包含後端支付處理
  • 需要手動處理敏感資料安全
  • 超出樣式之外的自定義功能有限
  • 除了格式檢查外,沒有內建驗證

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。


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

  • [x] add RESET button
  • [x] add box decoration param

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。