├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── _config.yml ├── android ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── kotlin │ └── com │ └── origogi │ └── credit_card_input_form │ └── CreditCardInputFormPlugin.kt ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── origogi │ │ │ │ │ └── credit_card_input_form_example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── .last_build_id │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── pubspec.lock └── pubspec.yaml ├── fonts ├── Satisfy-Regular.ttf └── fontYouandiModernTR.ttf ├── images ├── amex.png ├── checkmark.png ├── discover.png ├── mastercard.png ├── others.png └── visacard.png ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── CreditCardInputFormPlugin.h │ ├── CreditCardInputFormPlugin.m │ └── SwiftCreditCardInputFormPlugin.swift └── credit_card_input_form.podspec ├── lib ├── components │ ├── back_card_view.dart │ ├── card_cvv.dart │ ├── card_logo.dart │ ├── card_name.dart │ ├── card_number.dart │ ├── card_sign.dart │ ├── card_valid.dart │ ├── front_card_view.dart │ ├── input_view_pager.dart │ ├── my_appbar.dart │ ├── reset_button.dart │ ├── round_button.dart │ └── yellow_border.dart ├── constants │ ├── captions.dart │ └── constanst.dart ├── credit_card_input_form.dart ├── model │ └── card_info.dart ├── provider │ ├── card_cvv_provider.dart │ ├── card_name_provider.dart │ ├── card_number_provider.dart │ ├── card_valid_provider.dart │ └── state_provider.dart └── util │ └── util.dart ├── pubspec.lock └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Exceptions to above rules. 37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 38 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 0b8abb4724aa590dd0f429683339b1e045a1594d 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | 3 | * First Release 4 | 5 | ## 1.0.1 6 | 7 | * Adjust flutter format 8 | 9 | ## 1.0.2 10 | 11 | * update lastest provider library 12 | 13 | ## 1.0.3 14 | 15 | * update README 16 | 17 | ## 1.0.4 18 | 19 | * update README 20 | - change homepage 21 | 22 | ## 1.0.5 23 | 24 | * Fixed isssue when calling setState () with onStateChange () callback 25 | 26 | ## 1.1.0 27 | 28 | * Add `RESET`button 29 | 30 | ## 1.1.1 31 | 32 | * update README 33 | 34 | ## 1.2.0 35 | 36 | * added custom captions feature 37 | 38 | ## 1.3.0 39 | 40 | * added custom button style feature 41 | 42 | ## 1.3.1 43 | 44 | * removed duplicated code 45 | 46 | ## 2.0.0 47 | 48 | * added custom card boxdecoration 49 | 50 | ## 2.0.1 51 | 52 | * fix readme 53 | 54 | ## 2.0.2 55 | 56 | * update provider library 57 | 58 | ## 2.0.3 59 | 60 | * If the card number is Amex, the CVC code will be 4 digits, otherwise it will be 3 digits. 61 | 62 | ## 2.0.4 63 | 64 | * Removed unused library 65 | 66 | ## 2.0.5 67 | 68 | * Removed debug message 69 | 70 | ## 2.1.0 71 | 72 | * implement a new feature to add an initial value when creating a widget 73 | 74 | ## 2.1.1 75 | 76 | * Fix readme 77 | 78 | ## 2.1.2 79 | 80 | * Fix card number overflow in smaller devices like iPhone SE. 81 | 82 | ## 2.1.3 83 | 84 | * Fix readme 85 | 86 | ## 2.1.4 87 | 88 | * Fix text field bottom overflow 4 pixels in Samsung device. 89 | 90 | ## 2.1.5 91 | 92 | * Prevents characters from being entered into the card number 93 | 94 | ## 2.1.6 95 | 96 | * Prevents special characters from being entered into the card number 97 | 98 | ### v2.2.0 99 | 100 | Add initial autofocus parameter 101 | 102 | ### v2.3.0 103 | 104 | Flutter 2.0 migration -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, Origogi 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
7 | 8 |
9 | 10 | Platform 12 | 13 | 14 | 15 | 16 | 17 | 18 | Awesome Flutter 19 | 20 | 21 | 22 | 23 | 24 | 25 |

26 | 27 | This package provides visually beautiful UX through animation of credit card information input form. 28 | 29 | ## Preview 30 | 31 |
32 | 33 | 34 | 35 |
36 | 37 | ## Installing 38 | 39 | 1. Add dependency to `pubspec.yaml` 40 | 41 | *Get the latest version in the 'Installing' tab on pub.dartlang.org* 42 | 43 | ```dart 44 | dependencies: 45 | credit_card_input_form: ^2.3.0 46 | ``` 47 | 48 | 2. Import the package 49 | 50 | ```dart 51 | import 'package:credit_card_input_form/credit_card_input_form.dart'; 52 | ``` 53 | 54 | 3. Adding `CreditCardInputForm` 55 | 56 | *With optional parameters* 57 | ```dart 58 | CreditCardInputForm( 59 | cardHeight: 170, 60 | showResetButton : true, 61 | onStateChange: (currentState, cardInfo) { 62 | print(currentState); 63 | print(cardInfo); 64 | }, 65 | customCaptions: {...}, 66 | frontCardDecoration: cardDecoration, 67 | backCardDecoration: cardDecoration, 68 | prevButtonDecoration: buttonStyle, 69 | nextButtonDecoration: buttonStyle, 70 | resetButtonDecoration : buttonStyle, 71 | prevButtonTextStyle: buttonTextStyle, 72 | nextButtonTextStyle: buttonTextStyle, 73 | resetButtonTextStyle: buttonTextStyle, 74 | initialAutoFocus: true, // optional 75 | 76 | ), 77 | ``` 78 | 79 | ## How to use 80 | 81 | Check out the **example** app in the [example](example) directory or the 'Example' tab on pub.dartlang.org for a more complete example. 82 | 83 | ## New Feature 84 | 85 | ### v1.3.0 86 | 87 | added custom button style feature 88 | 89 |
90 | 91 | |Default|Custom| 92 | |------|---| 93 | |![default](https://user-images.githubusercontent.com/35194820/89704240-1e49f180-d98d-11ea-9305-5938f0386251.PNG)|![custom](https://user-images.githubusercontent.com/35194820/89704237-1d18c480-d98d-11ea-9557-36a8519da301.PNG)| 94 |
95 | 96 | ~~~dart 97 | final buttonDecoration = BoxDecoration( 98 | borderRadius: BorderRadius.circular(30.0), 99 | gradient: LinearGradient( 100 | colors: [ 101 | const Color(0xfffcdf8a), 102 | const Color(0xfff38381), 103 | ], 104 | begin: const FractionalOffset(0.0, 0.0), 105 | end: const FractionalOffset(1.0, 0.0), 106 | stops: [0.0, 1.0], 107 | tileMode: TileMode.clamp), 108 | ); 109 | 110 | final buttonTextStyle = 111 | TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18); 112 | 113 | CreditCardInputForm( 114 | prevButtonDecoration: buttonDecoration, 115 | nextButtonDecoration: buttonDecoration, 116 | prevButtonTextStyle: buttonTextStyle, 117 | nextButtonTextStyle: buttonTextStyle, 118 | resetButtonTextStyle: buttonTextStyle, 119 | ), 120 | 121 | ~~~ 122 | 123 | ### v2.0.0 124 | 125 | It provides more options using boxdecoration that can only change the color of the card. 126 | 127 |
128 | 129 | |Default|Custom| 130 | |------|---| 131 | |![image](https://user-images.githubusercontent.com/35194820/89976756-434ba680-dca4-11ea-8297-ed7dccbfb6e6.png)|![image](https://user-images.githubusercontent.com/35194820/89976725-2b742280-dca4-11ea-8771-9e3bd9690ee0.png)| 132 |
133 | 134 | ~~~dart 135 | final cardDecoration = BoxDecoration( 136 | boxShadow: [ 137 | BoxShadow(color: Colors.black54, blurRadius: 15.0, offset: Offset(0, 8)) 138 | ], 139 | gradient: LinearGradient( 140 | colors: [ 141 | Colors.red, 142 | Colors.blue, 143 | ], 144 | begin: const FractionalOffset(0.0, 0.0), 145 | end: const FractionalOffset(1.0, 0.0), 146 | stops: [0.0, 1.0], 147 | tileMode: TileMode.clamp), 148 | borderRadius: BorderRadius.all(Radius.circular(15))); 149 | 150 | 151 | CreditCardInputForm( 152 | frontCardDecoration: cardDecoration, 153 | backCardDecoration: cardDecoration, 154 | ), 155 | ]), 156 | ~~~ 157 | 158 | ### v2.1.0 159 | 160 | implement a new feature to add an initial value when creating a widget 161 | 162 | 163 | 164 | 165 | 166 | 167 | 180 | 186 | 187 |
Code Preview
168 | 169 | ~~~dart 170 | CreditCardInputForm( 171 | .... 172 | cardCVV: '222', 173 | cardName: 'Jeongtae Kim', 174 | cardNumber: '1111111111111111', 175 | cardValid: '12/12', 176 | intialCardState: InputState.DONE, 177 | ), 178 | ~~~ 179 | 181 | 182 | ![ezgif com-gif-maker](https://user-images.githubusercontent.com/35194820/96005684-a958d380-0e77-11eb-8b5e-f9dd889c875f.gif) 183 | 184 | 185 |
188 | 189 | ### v2.2.0 190 | 191 | Add `initialAutoFocus` parameter 192 | 193 | ## 3rd party library 194 | 195 | ### Flip card 196 | 197 | https://pub.dev/packages/flip_card 198 | 199 | *For use card flip animation* 200 | 201 | ### Provider 202 | 203 | https://pub.dev/packages/provider 204 | 205 | *For use state management* 206 | 207 | ## Reference 208 | 209 | This package's animation is inspired from from this [Dribbble](https://dribbble.com/shots/6440077-Add-a-New-Credit-Card-alternate-flow 210 | ) art 211 | 212 | ## TODO List 213 | 214 | - [x] add `RESET` button 215 | - [x] add box decoration param 216 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /android/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | credit_card_input_form 4 | Project android_ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3)) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.origogi.credit_card_input_form' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | ext.kotlin_version = '1.3.50' 6 | repositories { 7 | google() 8 | jcenter() 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:3.5.0' 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | rootProject.allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | } 22 | } 23 | 24 | apply plugin: 'com.android.library' 25 | apply plugin: 'kotlin-android' 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | sourceSets { 31 | main.java.srcDirs += 'src/main/kotlin' 32 | } 33 | defaultConfig { 34 | minSdkVersion 16 35 | } 36 | lintOptions { 37 | disable 'InvalidPackage' 38 | } 39 | } 40 | 41 | dependencies { 42 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 43 | } 44 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'credit_card_input_form' 2 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /android/src/main/kotlin/com/origogi/credit_card_input_form/CreditCardInputFormPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.origogi.credit_card_input_form 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import io.flutter.embedding.engine.plugins.FlutterPlugin 6 | import io.flutter.plugin.common.MethodCall 7 | import io.flutter.plugin.common.MethodChannel 8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler 9 | import io.flutter.plugin.common.MethodChannel.Result 10 | import io.flutter.plugin.common.PluginRegistry.Registrar 11 | 12 | /** CreditCardInputFormPlugin */ 13 | public class CreditCardInputFormPlugin: FlutterPlugin, MethodCallHandler { 14 | /// The MethodChannel that will the communication between Flutter and native Android 15 | /// 16 | /// This local reference serves to register the plugin with the Flutter Engine and unregister it 17 | /// when the Flutter Engine is detached from the Activity 18 | private lateinit var channel : MethodChannel 19 | 20 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { 21 | channel = MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "credit_card_input_form") 22 | channel.setMethodCallHandler(this); 23 | } 24 | 25 | // This static function is optional and equivalent to onAttachedToEngine. It supports the old 26 | // pre-Flutter-1.12 Android projects. You are encouraged to continue supporting 27 | // plugin registration via this function while apps migrate to use the new Android APIs 28 | // post-flutter-1.12 via https://flutter.dev/go/android-project-migration. 29 | // 30 | // It is encouraged to share logic between onAttachedToEngine and registerWith to keep 31 | // them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called 32 | // depending on the user's project. onAttachedToEngine or registerWith must both be defined 33 | // in the same class. 34 | companion object { 35 | @JvmStatic 36 | fun registerWith(registrar: Registrar) { 37 | val channel = MethodChannel(registrar.messenger(), "credit_card_input_form") 38 | channel.setMethodCallHandler(CreditCardInputFormPlugin()) 39 | } 40 | } 41 | 42 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { 43 | if (call.method == "getPlatformVersion") { 44 | result.success("Android ${android.os.Build.VERSION.RELEASE}") 45 | } else { 46 | result.notImplemented() 47 | } 48 | } 49 | 50 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { 51 | channel.setMethodCallHandler(null) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # credit_card_input_form_example 2 | 3 | Demonstrates how to use the credit_card_input_form plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /example/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.origogi.credit_card_input_form_example" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/origogi/credit_card_input_form_example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.origogi.credit_card_input_form_example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | 1cd4485d99bf93c780f2e6fa1e8143cc -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | post_install do |installer| 82 | installer.pods_project.targets.each do |target| 83 | target.build_configurations.each do |config| 84 | config.build_settings['ENABLE_BITCODE'] = 'NO' 85 | end 86 | end 87 | end 88 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - credit_card_input_form (0.0.1): 3 | - Flutter 4 | - Flutter (1.0.0) 5 | 6 | DEPENDENCIES: 7 | - credit_card_input_form (from `.symlinks/plugins/credit_card_input_form/ios`) 8 | - Flutter (from `Flutter`) 9 | 10 | EXTERNAL SOURCES: 11 | credit_card_input_form: 12 | :path: ".symlinks/plugins/credit_card_input_form/ios" 13 | Flutter: 14 | :path: Flutter 15 | 16 | SPEC CHECKSUMS: 17 | credit_card_input_form: c849da5e6fc6ebf157d84b06077f54d6aa12fae5 18 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 19 | 20 | PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a 21 | 22 | COCOAPODS: 1.9.0 23 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | E7EDFB69973C8D36287482E2 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 758FDD6CB7BB3355A871AEE5 /* Pods_Runner.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 1A726035D503215EF2752457 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 36 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 37 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 38 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 39 | 758FDD6CB7BB3355A871AEE5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 8D4A7914F8267A17B5A74BBE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | ADC9F8ECDD797EE5B9385701 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | E7EDFB69973C8D36287482E2 /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 0FA75E401A808232B6139DDB /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 758FDD6CB7BB3355A871AEE5 /* Pods_Runner.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | 74718620A9F2467A435633F9 /* Pods */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 1A726035D503215EF2752457 /* Pods-Runner.debug.xcconfig */, 76 | 8D4A7914F8267A17B5A74BBE /* Pods-Runner.release.xcconfig */, 77 | ADC9F8ECDD797EE5B9385701 /* Pods-Runner.profile.xcconfig */, 78 | ); 79 | name = Pods; 80 | path = Pods; 81 | sourceTree = ""; 82 | }; 83 | 9740EEB11CF90186004384FC /* Flutter */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 87 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 88 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 89 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 90 | ); 91 | name = Flutter; 92 | sourceTree = ""; 93 | }; 94 | 97C146E51CF9000F007C117D = { 95 | isa = PBXGroup; 96 | children = ( 97 | 9740EEB11CF90186004384FC /* Flutter */, 98 | 97C146F01CF9000F007C117D /* Runner */, 99 | 97C146EF1CF9000F007C117D /* Products */, 100 | 74718620A9F2467A435633F9 /* Pods */, 101 | 0FA75E401A808232B6139DDB /* Frameworks */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | 97C146EF1CF9000F007C117D /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 97C146EE1CF9000F007C117D /* Runner.app */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | 97C146F01CF9000F007C117D /* Runner */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 117 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 118 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 119 | 97C147021CF9000F007C117D /* Info.plist */, 120 | 97C146F11CF9000F007C117D /* Supporting Files */, 121 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 122 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 123 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 124 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 125 | ); 126 | path = Runner; 127 | sourceTree = ""; 128 | }; 129 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | ); 133 | name = "Supporting Files"; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXNativeTarget section */ 139 | 97C146ED1CF9000F007C117D /* Runner */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 142 | buildPhases = ( 143 | 7A8D27343A495ED2F08CA890 /* [CP] Check Pods Manifest.lock */, 144 | 9740EEB61CF901F6004384FC /* Run Script */, 145 | 97C146EA1CF9000F007C117D /* Sources */, 146 | 97C146EB1CF9000F007C117D /* Frameworks */, 147 | 97C146EC1CF9000F007C117D /* Resources */, 148 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 149 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 150 | 4D75E66873923595FAA3BB79 /* [CP] Embed Pods Frameworks */, 151 | ); 152 | buildRules = ( 153 | ); 154 | dependencies = ( 155 | ); 156 | name = Runner; 157 | productName = Runner; 158 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 159 | productType = "com.apple.product-type.application"; 160 | }; 161 | /* End PBXNativeTarget section */ 162 | 163 | /* Begin PBXProject section */ 164 | 97C146E61CF9000F007C117D /* Project object */ = { 165 | isa = PBXProject; 166 | attributes = { 167 | LastUpgradeCheck = 1020; 168 | ORGANIZATIONNAME = ""; 169 | TargetAttributes = { 170 | 97C146ED1CF9000F007C117D = { 171 | CreatedOnToolsVersion = 7.3.1; 172 | LastSwiftMigration = 1100; 173 | }; 174 | }; 175 | }; 176 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 177 | compatibilityVersion = "Xcode 9.3"; 178 | developmentRegion = en; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | Base, 183 | ); 184 | mainGroup = 97C146E51CF9000F007C117D; 185 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 97C146ED1CF9000F007C117D /* Runner */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 97C146EC1CF9000F007C117D /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 200 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 201 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 202 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXResourcesBuildPhase section */ 207 | 208 | /* Begin PBXShellScriptBuildPhase section */ 209 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 210 | isa = PBXShellScriptBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | inputPaths = ( 215 | ); 216 | name = "Thin Binary"; 217 | outputPaths = ( 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | shellPath = /bin/sh; 221 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 222 | }; 223 | 4D75E66873923595FAA3BB79 /* [CP] Embed Pods Frameworks */ = { 224 | isa = PBXShellScriptBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | ); 228 | inputPaths = ( 229 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 230 | "${PODS_ROOT}/../Flutter/Flutter.framework", 231 | "${BUILT_PRODUCTS_DIR}/credit_card_input_form/credit_card_input_form.framework", 232 | ); 233 | name = "[CP] Embed Pods Frameworks"; 234 | outputPaths = ( 235 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 236 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/credit_card_input_form.framework", 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | shellPath = /bin/sh; 240 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 241 | showEnvVarsInLog = 0; 242 | }; 243 | 7A8D27343A495ED2F08CA890 /* [CP] Check Pods Manifest.lock */ = { 244 | isa = PBXShellScriptBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | ); 248 | inputFileListPaths = ( 249 | ); 250 | inputPaths = ( 251 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 252 | "${PODS_ROOT}/Manifest.lock", 253 | ); 254 | name = "[CP] Check Pods Manifest.lock"; 255 | outputFileListPaths = ( 256 | ); 257 | outputPaths = ( 258 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | shellPath = /bin/sh; 262 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 263 | showEnvVarsInLog = 0; 264 | }; 265 | 9740EEB61CF901F6004384FC /* Run Script */ = { 266 | isa = PBXShellScriptBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | inputPaths = ( 271 | ); 272 | name = "Run Script"; 273 | outputPaths = ( 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | shellPath = /bin/sh; 277 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 278 | }; 279 | /* End PBXShellScriptBuildPhase section */ 280 | 281 | /* Begin PBXSourcesBuildPhase section */ 282 | 97C146EA1CF9000F007C117D /* Sources */ = { 283 | isa = PBXSourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 287 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | /* End PBXSourcesBuildPhase section */ 292 | 293 | /* Begin PBXVariantGroup section */ 294 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 295 | isa = PBXVariantGroup; 296 | children = ( 297 | 97C146FB1CF9000F007C117D /* Base */, 298 | ); 299 | name = Main.storyboard; 300 | sourceTree = ""; 301 | }; 302 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 303 | isa = PBXVariantGroup; 304 | children = ( 305 | 97C147001CF9000F007C117D /* Base */, 306 | ); 307 | name = LaunchScreen.storyboard; 308 | sourceTree = ""; 309 | }; 310 | /* End PBXVariantGroup section */ 311 | 312 | /* Begin XCBuildConfiguration section */ 313 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 314 | isa = XCBuildConfiguration; 315 | buildSettings = { 316 | ALWAYS_SEARCH_USER_PATHS = NO; 317 | CLANG_ANALYZER_NONNULL = YES; 318 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 319 | CLANG_CXX_LIBRARY = "libc++"; 320 | CLANG_ENABLE_MODULES = YES; 321 | CLANG_ENABLE_OBJC_ARC = YES; 322 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 323 | CLANG_WARN_BOOL_CONVERSION = YES; 324 | CLANG_WARN_COMMA = YES; 325 | CLANG_WARN_CONSTANT_CONVERSION = YES; 326 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 327 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 328 | CLANG_WARN_EMPTY_BODY = YES; 329 | CLANG_WARN_ENUM_CONVERSION = YES; 330 | CLANG_WARN_INFINITE_RECURSION = YES; 331 | CLANG_WARN_INT_CONVERSION = YES; 332 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 333 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 334 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 335 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 336 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 337 | CLANG_WARN_STRICT_PROTOTYPES = YES; 338 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 339 | CLANG_WARN_UNREACHABLE_CODE = YES; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 342 | COPY_PHASE_STRIP = NO; 343 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 344 | ENABLE_NS_ASSERTIONS = NO; 345 | ENABLE_STRICT_OBJC_MSGSEND = YES; 346 | GCC_C_LANGUAGE_STANDARD = gnu99; 347 | GCC_NO_COMMON_BLOCKS = YES; 348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 350 | GCC_WARN_UNDECLARED_SELECTOR = YES; 351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 352 | GCC_WARN_UNUSED_FUNCTION = YES; 353 | GCC_WARN_UNUSED_VARIABLE = YES; 354 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 355 | MTL_ENABLE_DEBUG_INFO = NO; 356 | SDKROOT = iphoneos; 357 | SUPPORTED_PLATFORMS = iphoneos; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | VALIDATE_PRODUCT = YES; 360 | }; 361 | name = Profile; 362 | }; 363 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 364 | isa = XCBuildConfiguration; 365 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 366 | buildSettings = { 367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 368 | CLANG_ENABLE_MODULES = YES; 369 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 370 | ENABLE_BITCODE = NO; 371 | FRAMEWORK_SEARCH_PATHS = ( 372 | "$(inherited)", 373 | "$(PROJECT_DIR)/Flutter", 374 | ); 375 | INFOPLIST_FILE = Runner/Info.plist; 376 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 377 | LIBRARY_SEARCH_PATHS = ( 378 | "$(inherited)", 379 | "$(PROJECT_DIR)/Flutter", 380 | ); 381 | PRODUCT_BUNDLE_IDENTIFIER = com.origogi.creditCardInputFormExample; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 384 | SWIFT_VERSION = 5.0; 385 | VERSIONING_SYSTEM = "apple-generic"; 386 | }; 387 | name = Profile; 388 | }; 389 | 97C147031CF9000F007C117D /* Debug */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_EMPTY_BODY = YES; 405 | CLANG_WARN_ENUM_CONVERSION = YES; 406 | CLANG_WARN_INFINITE_RECURSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 413 | CLANG_WARN_STRICT_PROTOTYPES = YES; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = dwarf; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | ENABLE_TESTABILITY = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_DYNAMIC_NO_PIC = NO; 424 | GCC_NO_COMMON_BLOCKS = YES; 425 | GCC_OPTIMIZATION_LEVEL = 0; 426 | GCC_PREPROCESSOR_DEFINITIONS = ( 427 | "DEBUG=1", 428 | "$(inherited)", 429 | ); 430 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 431 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 432 | GCC_WARN_UNDECLARED_SELECTOR = YES; 433 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 434 | GCC_WARN_UNUSED_FUNCTION = YES; 435 | GCC_WARN_UNUSED_VARIABLE = YES; 436 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 437 | MTL_ENABLE_DEBUG_INFO = YES; 438 | ONLY_ACTIVE_ARCH = YES; 439 | SDKROOT = iphoneos; 440 | TARGETED_DEVICE_FAMILY = "1,2"; 441 | }; 442 | name = Debug; 443 | }; 444 | 97C147041CF9000F007C117D /* Release */ = { 445 | isa = XCBuildConfiguration; 446 | buildSettings = { 447 | ALWAYS_SEARCH_USER_PATHS = NO; 448 | CLANG_ANALYZER_NONNULL = YES; 449 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 450 | CLANG_CXX_LIBRARY = "libc++"; 451 | CLANG_ENABLE_MODULES = YES; 452 | CLANG_ENABLE_OBJC_ARC = YES; 453 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 454 | CLANG_WARN_BOOL_CONVERSION = YES; 455 | CLANG_WARN_COMMA = YES; 456 | CLANG_WARN_CONSTANT_CONVERSION = YES; 457 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 458 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 459 | CLANG_WARN_EMPTY_BODY = YES; 460 | CLANG_WARN_ENUM_CONVERSION = YES; 461 | CLANG_WARN_INFINITE_RECURSION = YES; 462 | CLANG_WARN_INT_CONVERSION = YES; 463 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 464 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 465 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 466 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 467 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 468 | CLANG_WARN_STRICT_PROTOTYPES = YES; 469 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 470 | CLANG_WARN_UNREACHABLE_CODE = YES; 471 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 472 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 473 | COPY_PHASE_STRIP = NO; 474 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 475 | ENABLE_NS_ASSERTIONS = NO; 476 | ENABLE_STRICT_OBJC_MSGSEND = YES; 477 | GCC_C_LANGUAGE_STANDARD = gnu99; 478 | GCC_NO_COMMON_BLOCKS = YES; 479 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 480 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 481 | GCC_WARN_UNDECLARED_SELECTOR = YES; 482 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 483 | GCC_WARN_UNUSED_FUNCTION = YES; 484 | GCC_WARN_UNUSED_VARIABLE = YES; 485 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 486 | MTL_ENABLE_DEBUG_INFO = NO; 487 | SDKROOT = iphoneos; 488 | SUPPORTED_PLATFORMS = iphoneos; 489 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 490 | TARGETED_DEVICE_FAMILY = "1,2"; 491 | VALIDATE_PRODUCT = YES; 492 | }; 493 | name = Release; 494 | }; 495 | 97C147061CF9000F007C117D /* Debug */ = { 496 | isa = XCBuildConfiguration; 497 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 498 | buildSettings = { 499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 500 | CLANG_ENABLE_MODULES = YES; 501 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 502 | ENABLE_BITCODE = NO; 503 | FRAMEWORK_SEARCH_PATHS = ( 504 | "$(inherited)", 505 | "$(PROJECT_DIR)/Flutter", 506 | ); 507 | INFOPLIST_FILE = Runner/Info.plist; 508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 509 | LIBRARY_SEARCH_PATHS = ( 510 | "$(inherited)", 511 | "$(PROJECT_DIR)/Flutter", 512 | ); 513 | PRODUCT_BUNDLE_IDENTIFIER = com.origogi.creditCardInputFormExample; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 516 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 517 | SWIFT_VERSION = 5.0; 518 | VERSIONING_SYSTEM = "apple-generic"; 519 | }; 520 | name = Debug; 521 | }; 522 | 97C147071CF9000F007C117D /* Release */ = { 523 | isa = XCBuildConfiguration; 524 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 525 | buildSettings = { 526 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 527 | CLANG_ENABLE_MODULES = YES; 528 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 529 | ENABLE_BITCODE = NO; 530 | FRAMEWORK_SEARCH_PATHS = ( 531 | "$(inherited)", 532 | "$(PROJECT_DIR)/Flutter", 533 | ); 534 | INFOPLIST_FILE = Runner/Info.plist; 535 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 536 | LIBRARY_SEARCH_PATHS = ( 537 | "$(inherited)", 538 | "$(PROJECT_DIR)/Flutter", 539 | ); 540 | PRODUCT_BUNDLE_IDENTIFIER = com.origogi.creditCardInputFormExample; 541 | PRODUCT_NAME = "$(TARGET_NAME)"; 542 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 543 | SWIFT_VERSION = 5.0; 544 | VERSIONING_SYSTEM = "apple-generic"; 545 | }; 546 | name = Release; 547 | }; 548 | /* End XCBuildConfiguration section */ 549 | 550 | /* Begin XCConfigurationList section */ 551 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | 97C147031CF9000F007C117D /* Debug */, 555 | 97C147041CF9000F007C117D /* Release */, 556 | 249021D3217E4FDB00AE95B9 /* Profile */, 557 | ); 558 | defaultConfigurationIsVisible = 0; 559 | defaultConfigurationName = Release; 560 | }; 561 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 97C147061CF9000F007C117D /* Debug */, 565 | 97C147071CF9000F007C117D /* Release */, 566 | 249021D4217E4FDB00AE95B9 /* Profile */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | /* End XCConfigurationList section */ 572 | }; 573 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 574 | } 575 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | credit_card_input_form_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/constanst.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:credit_card_input_form/credit_card_input_form.dart'; 5 | 6 | void main() { 7 | runApp(MyApp()); 8 | } 9 | 10 | class MyApp extends StatefulWidget { 11 | @override 12 | _MyAppState createState() => _MyAppState(); 13 | } 14 | 15 | class _MyAppState extends State { 16 | // translate and customize captions 17 | final Map customCaptions = { 18 | 'PREV': 'Prev', 19 | 'NEXT': 'Next', 20 | 'DONE': 'Done', 21 | 'CARD_NUMBER': 'Card Number', 22 | 'CARDHOLDER_NAME': 'Cardholder Name', 23 | 'VALID_THRU': 'Valid Thru', 24 | 'SECURITY_CODE_CVC': 'Security Code (CVC)', 25 | 'NAME_SURNAME': 'Name Surname', 26 | 'MM_YY': 'MM/YY', 27 | 'RESET': 'Reset', 28 | }; 29 | 30 | final buttonStyle = BoxDecoration( 31 | borderRadius: BorderRadius.circular(30.0), 32 | gradient: LinearGradient( 33 | colors: [ 34 | const Color(0xfffcdf8a), 35 | const Color(0xfff38381), 36 | ], 37 | begin: const FractionalOffset(0.0, 0.0), 38 | end: const FractionalOffset(1.0, 0.0), 39 | stops: [0.0, 1.0], 40 | tileMode: TileMode.clamp), 41 | ); 42 | 43 | final cardDecoration = BoxDecoration( 44 | boxShadow: [ 45 | BoxShadow(color: Colors.black54, blurRadius: 15.0, offset: Offset(0, 8)) 46 | ], 47 | gradient: LinearGradient( 48 | colors: [ 49 | Colors.red, 50 | Colors.blue, 51 | ], 52 | begin: const FractionalOffset(0.0, 0.0), 53 | end: const FractionalOffset(1.0, 0.0), 54 | stops: [0.0, 1.0], 55 | tileMode: TileMode.clamp), 56 | borderRadius: BorderRadius.all(Radius.circular(15))); 57 | 58 | final buttonTextStyle = 59 | TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18); 60 | 61 | @override 62 | void initState() { 63 | super.initState(); 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return MaterialApp( 69 | home: Scaffold( 70 | body: SafeArea( 71 | child: AnimatedContainer( 72 | duration: Duration(milliseconds: 300), 73 | child: Stack(children: [ 74 | CreditCardInputForm( 75 | showResetButton: true, 76 | onStateChange: (currentState, cardInfo) { 77 | print(currentState); 78 | print(cardInfo); 79 | }, 80 | // initialAutoFocus: false, 81 | // customCaptions: customCaptions, 82 | // cardCVV: '222', 83 | // cardName: 'Jeongtae Kim', 84 | // cardNumber: '1111111111111111', 85 | // cardValid: '12/12', 86 | // intialCardState: InputState.DONE, 87 | // frontCardDecoration: cardDecoration, 88 | // backCardDecoration: cardDecoration, 89 | // prevButtonStyle: buttonStyle, 90 | // nextButtonStyle: buttonStyle, 91 | // prevButtonTextStyle: buttonTextStyle, 92 | // nextButtonTextStyle: buttonTextStyle, 93 | // resetButtonTextStyle: buttonTextStyle, 94 | ), 95 | ]), 96 | ), 97 | ), 98 | ), 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | credit_card_input_form: 47 | dependency: "direct main" 48 | description: 49 | path: ".." 50 | relative: true 51 | source: path 52 | version: "2.3.0" 53 | cupertino_icons: 54 | dependency: "direct main" 55 | description: 56 | name: cupertino_icons 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "0.1.3" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.2.0" 67 | flip_card: 68 | dependency: transitive 69 | description: 70 | name: flip_card 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.5.0" 74 | flutter: 75 | dependency: "direct main" 76 | description: flutter 77 | source: sdk 78 | version: "0.0.0" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | matcher: 85 | dependency: transitive 86 | description: 87 | name: matcher 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "0.12.10" 91 | meta: 92 | dependency: transitive 93 | description: 94 | name: meta 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.3.0" 98 | nested: 99 | dependency: transitive 100 | description: 101 | name: nested 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.0.0" 105 | path: 106 | dependency: transitive 107 | description: 108 | name: path 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.8.0" 112 | provider: 113 | dependency: transitive 114 | description: 115 | name: provider 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "5.0.0" 119 | sky_engine: 120 | dependency: transitive 121 | description: flutter 122 | source: sdk 123 | version: "0.0.99" 124 | source_span: 125 | dependency: transitive 126 | description: 127 | name: source_span 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.8.0" 131 | stack_trace: 132 | dependency: transitive 133 | description: 134 | name: stack_trace 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.10.0" 138 | stream_channel: 139 | dependency: transitive 140 | description: 141 | name: stream_channel 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "2.1.0" 145 | string_scanner: 146 | dependency: transitive 147 | description: 148 | name: string_scanner 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.1.0" 152 | term_glyph: 153 | dependency: transitive 154 | description: 155 | name: term_glyph 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.2.0" 159 | test_api: 160 | dependency: transitive 161 | description: 162 | name: test_api 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "0.2.19" 166 | typed_data: 167 | dependency: transitive 168 | description: 169 | name: typed_data 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.3.0" 173 | vector_math: 174 | dependency: transitive 175 | description: 176 | name: vector_math 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "2.1.0" 180 | sdks: 181 | dart: ">=2.12.0 <3.0.0" 182 | flutter: ">=1.16.0" 183 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: credit_card_input_form_example 2 | description: Demonstrates how to use the credit_card_input_form plugin. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | environment: 9 | sdk: ">=2.7.0 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | credit_card_input_form: 16 | # When depending on this package from a real application you should use: 17 | # credit_card_input_form: ^x.y.z 18 | # See https://dart.dev/tools/pub/dependencies#version-constraints 19 | # The example app is bundled with the plugin so we use a path dependency on 20 | # the parent directory to use the current plugin's version. 21 | path: ../ 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.3 26 | 27 | dev_dependencies: 28 | flutter_test: 29 | sdk: flutter 30 | 31 | # For information on the generic Dart part of this file, see the 32 | # following page: https://dart.dev/tools/pub/pubspec 33 | 34 | # The following section is specific to Flutter. 35 | flutter: 36 | 37 | # The following line ensures that the Material Icons font is 38 | # included with your application, so that you can use the icons in 39 | # the material Icons class. 40 | uses-material-design: true 41 | 42 | # To add assets to your application, add an assets section, like this: 43 | # assets: 44 | # - images/a_dot_burr.jpeg 45 | # - images/a_dot_ham.jpeg 46 | 47 | # An image asset can refer to one or more resolution-specific "variants", see 48 | # https://flutter.dev/assets-and-images/#resolution-aware. 49 | 50 | # For details regarding adding assets from package dependencies, see 51 | # https://flutter.dev/assets-and-images/#from-packages 52 | 53 | # To add custom fonts to your application, add a fonts section here, 54 | # in this "flutter" section. Each entry in this list should have a 55 | # "family" key with the font family name, and a "fonts" key with a 56 | # list giving the asset and other descriptors for the font. For 57 | # example: 58 | # fonts: 59 | # - family: Schyler 60 | # fonts: 61 | # - asset: fonts/Schyler-Regular.ttf 62 | # - asset: fonts/Schyler-Italic.ttf 63 | # style: italic 64 | # - family: Trajan Pro 65 | # fonts: 66 | # - asset: fonts/TrajanPro.ttf 67 | # - asset: fonts/TrajanPro_Bold.ttf 68 | # weight: 700 69 | # 70 | # For details regarding fonts from package dependencies, 71 | # see https://flutter.dev/custom-fonts/#from-packages 72 | -------------------------------------------------------------------------------- /fonts/Satisfy-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/fonts/Satisfy-Regular.ttf -------------------------------------------------------------------------------- /fonts/fontYouandiModernTR.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/fonts/fontYouandiModernTR.ttf -------------------------------------------------------------------------------- /images/amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/images/amex.png -------------------------------------------------------------------------------- /images/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/images/checkmark.png -------------------------------------------------------------------------------- /images/discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/images/discover.png -------------------------------------------------------------------------------- /images/mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/images/mastercard.png -------------------------------------------------------------------------------- /images/others.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/images/others.png -------------------------------------------------------------------------------- /images/visacard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/images/visacard.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Origogi/Flutter-Credit-Card-Input-Form/cd8dfc8a72e45e1395ab081f1e3da71113246de6/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /ios/Classes/CreditCardInputFormPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CreditCardInputFormPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /ios/Classes/CreditCardInputFormPlugin.m: -------------------------------------------------------------------------------- 1 | #import "CreditCardInputFormPlugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "credit_card_input_form-Swift.h" 9 | #endif 10 | 11 | @implementation CreditCardInputFormPlugin 12 | + (void)registerWithRegistrar:(NSObject*)registrar { 13 | [SwiftCreditCardInputFormPlugin registerWithRegistrar:registrar]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /ios/Classes/SwiftCreditCardInputFormPlugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | public class SwiftCreditCardInputFormPlugin: NSObject, FlutterPlugin { 5 | public static func register(with registrar: FlutterPluginRegistrar) { 6 | let channel = FlutterMethodChannel(name: "credit_card_input_form", binaryMessenger: registrar.messenger()) 7 | let instance = SwiftCreditCardInputFormPlugin() 8 | registrar.addMethodCallDelegate(instance, channel: channel) 9 | } 10 | 11 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 12 | result("iOS " + UIDevice.current.systemVersion) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ios/credit_card_input_form.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint credit_card_input_form.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'credit_card_input_form' 7 | s.version = '0.0.1' 8 | s.summary = 'A new flutter plugin project.' 9 | s.description = <<-DESC 10 | A new flutter plugin project. 11 | DESC 12 | s.homepage = 'http://example.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'email@example.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.dependency 'Flutter' 18 | s.platform = :ios, '8.0' 19 | 20 | # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. 21 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } 22 | s.swift_version = '5.0' 23 | end 24 | -------------------------------------------------------------------------------- /lib/components/back_card_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/constanst.dart'; 2 | import 'package:credit_card_input_form/provider/state_provider.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:credit_card_input_form/components/card_logo.dart'; 5 | import 'package:provider/provider.dart'; 6 | import 'card_cvv.dart'; 7 | import 'card_sign.dart'; 8 | 9 | class BackCardView extends StatelessWidget { 10 | final height; 11 | final decoration; 12 | 13 | BackCardView({this.height, this.decoration}); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final currentState = 18 | Provider.of(context, listen: false).getCurrentState(); 19 | return Container( 20 | margin: EdgeInsets.only(bottom: 5), 21 | height: height, 22 | decoration: decoration, 23 | child: Stack( 24 | children: [ 25 | Container( 26 | margin: EdgeInsets.only(top: 25), 27 | height: 35, 28 | color: Colors.black, 29 | ), 30 | Align(alignment: Alignment.centerLeft, child: CardSign()), 31 | AnimatedOpacity( 32 | opacity: currentState != InputState.DONE ? 1 : 0, 33 | duration: Duration(milliseconds: 300), 34 | child: Align( 35 | alignment: Alignment.centerRight, 36 | child: Container( 37 | margin: EdgeInsets.only(right: 30), 38 | decoration: BoxDecoration( 39 | borderRadius: BorderRadius.circular(7.5), 40 | border: Border.all( 41 | color: 42 | Colors.yellow, // <--- border color 43 | width: 1.0, 44 | ), 45 | ), 46 | child: Container( 47 | height: 45, 48 | width: 75, 49 | ), 50 | )), 51 | ), 52 | Align( 53 | alignment: Alignment.centerRight, 54 | child: Container( 55 | margin: EdgeInsets.only(right: 30), 56 | child: CardCVV(), 57 | )), 58 | Align( 59 | alignment: Alignment.bottomRight, 60 | child: Padding( 61 | padding: const EdgeInsets.only(bottom: 10, right: 30), 62 | child: CardLogo(), 63 | )), 64 | ], 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/components/card_cvv.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:credit_card_input_form/constants/constanst.dart'; 3 | import 'package:credit_card_input_form/provider/card_cvv_provider.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | class CardCVV extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return Consumer( 10 | builder: (context, value, child) { 11 | return Padding( 12 | padding: const EdgeInsets.all(3.0), 13 | child: Container( 14 | height: 40, 15 | width: 70, 16 | color: Colors.white, 17 | child: Center( 18 | child: Text( 19 | value.cardCVV, 20 | style: kCVCTextStyle, 21 | ), 22 | ), 23 | ), 24 | ); 25 | }, 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/components/card_logo.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/util/util.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:credit_card_input_form/constants/constanst.dart'; 4 | import 'package:credit_card_input_form/provider/card_number_provider.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | class CardLogo extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | String cardNumber = Provider.of(context).cardNumber; 11 | 12 | CardCompany cardCompany = detectCardCompany(cardNumber); 13 | 14 | return Stack( 15 | children: [ 16 | AnimatedOpacity( 17 | opacity: cardCompany == CardCompany.VISA ? 1 : 0, 18 | child: visa, 19 | duration: Duration(milliseconds: 200), 20 | ), 21 | AnimatedOpacity( 22 | opacity: cardCompany == CardCompany.MASTER ? 1 : 0, 23 | child: master, 24 | duration: Duration(milliseconds: 200)), 25 | AnimatedOpacity( 26 | opacity: cardCompany == CardCompany.DISCOVER ? 1 : 0, 27 | child: discover, 28 | duration: Duration(milliseconds: 200)), 29 | AnimatedOpacity( 30 | opacity: cardCompany == CardCompany.AMERICAN_EXPRESS ? 1 : 0, 31 | child: amex, 32 | duration: Duration(milliseconds: 200)), 33 | ], 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/components/card_name.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/captions.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:credit_card_input_form/constants/constanst.dart'; 4 | import 'package:credit_card_input_form/provider/card_name_provider.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | class CardName extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | final defaultName = 11 | Provider.of(context).getCaption('NAME_SURNAME')!.toUpperCase(); 12 | final String name = 13 | Provider.of(context).cardName.toUpperCase(); 14 | 15 | return Text(name.isNotEmpty ? name : defaultName, 16 | style: name.isNotEmpty ? kNametextStyle : kDefaultNameTextStyle); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/components/card_number.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:credit_card_input_form/provider/card_number_provider.dart'; 3 | import 'package:provider/provider.dart'; 4 | 5 | import 'package:credit_card_input_form/constants/constanst.dart'; 6 | 7 | class CardNumber extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | String cardNumber = 11 | Provider.of(context, listen: true).cardNumber; 12 | String defaultNumber = ''; 13 | 14 | final numberLength = cardNumber.replaceAll(" ", "").length; 15 | 16 | for (int i = 1; i <= 16 - numberLength; i++) { 17 | defaultNumber = 'X' + defaultNumber; 18 | if (i % 4 == 0 && i != 16) { 19 | defaultNumber = ' ' + defaultNumber; 20 | } 21 | } 22 | 23 | return Container( 24 | child: Padding( 25 | padding: const EdgeInsets.only(left: 5), 26 | child: FittedBox( 27 | fit: BoxFit.scaleDown, 28 | child: Row( 29 | children: [ 30 | Text( 31 | cardNumber, 32 | style: kCardNumberTextStyle, 33 | ), 34 | Text( 35 | defaultNumber, 36 | style: kCardDefaultTextStyle, 37 | ) 38 | ], 39 | ), 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/components/card_sign.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:credit_card_input_form/provider/card_name_provider.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:credit_card_input_form/constants/constanst.dart'; 5 | 6 | class CardSign extends StatelessWidget { 7 | const CardSign({ 8 | Key? key, 9 | }) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Consumer( 14 | builder: (context, provider, child) { 15 | String cardName = provider.cardName; 16 | 17 | if (cardName.isNotEmpty) { 18 | cardName = cardName 19 | .split(' ') 20 | .map((e) => e.isNotEmpty 21 | ? '${e[0].toUpperCase()}${e.substring(1).toLowerCase()}' 22 | : e) 23 | .join(' '); 24 | } 25 | 26 | return Container( 27 | margin: EdgeInsets.only(left: 25), 28 | height: 40, 29 | width: 220, 30 | color: Colors.grey, 31 | child: Center( 32 | child: Text( 33 | cardName, 34 | style: kSignTextStyle, 35 | ), 36 | ), 37 | ); 38 | }, 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/components/card_valid.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/captions.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:credit_card_input_form/provider/card_valid_provider.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:credit_card_input_form/constants/constanst.dart'; 6 | 7 | class CardValid extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | String inputCardValid = Provider.of(context).cardValid; 11 | 12 | var defaultCardValid = Provider.of(context) 13 | .getCaption('MM_YY')! 14 | .substring(inputCardValid.length); 15 | 16 | inputCardValid = inputCardValid.replaceAll("/", ""); 17 | 18 | switch (inputCardValid.length) { 19 | case 3: 20 | inputCardValid = 21 | inputCardValid[0] + inputCardValid[1] + '/' + inputCardValid[2]; 22 | break; 23 | case 4: 24 | inputCardValid = inputCardValid[0] + 25 | inputCardValid[1] + 26 | '/' + 27 | inputCardValid[2] + 28 | inputCardValid[3]; 29 | break; 30 | } 31 | 32 | return Container( 33 | child: Row( 34 | mainAxisAlignment: MainAxisAlignment.end, 35 | children: [ 36 | Text( 37 | inputCardValid, 38 | style: kValidtextStyle, 39 | ), 40 | Text( 41 | defaultCardValid, 42 | style: kDefaultValidTextStyle, 43 | ) 44 | ], 45 | )); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/components/front_card_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/captions.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:credit_card_input_form/components/yellow_border.dart'; 4 | import 'package:credit_card_input_form/constants/constanst.dart'; 5 | import 'package:provider/provider.dart'; 6 | import 'card_logo.dart'; 7 | import 'card_name.dart'; 8 | import 'card_number.dart'; 9 | import 'card_valid.dart'; 10 | 11 | class FrontCardView extends StatelessWidget { 12 | final height; 13 | final decoration; 14 | 15 | FrontCardView({this.height, this.decoration}); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final captions = Provider.of(context); 20 | 21 | return Container( 22 | margin: EdgeInsets.only(bottom: 5), 23 | height: height, 24 | decoration: decoration, 25 | child: Padding( 26 | padding: const EdgeInsets.all(15.0), 27 | child: Stack( 28 | children: [ 29 | YellowBorder(), 30 | Align( 31 | alignment: Alignment.centerLeft, 32 | child: CardNumber(), 33 | ), 34 | Align(alignment: Alignment.topRight, child: CardLogo()), 35 | Align( 36 | alignment: Alignment.bottomLeft, 37 | child: Padding( 38 | padding: const EdgeInsets.all(8), 39 | child: Column( 40 | crossAxisAlignment: CrossAxisAlignment.start, 41 | mainAxisAlignment: MainAxisAlignment.end, 42 | children: [ 43 | Text( 44 | captions.getCaption('CARDHOLDER_NAME')!.toUpperCase(), 45 | style: kTextStyle, 46 | ), 47 | SizedBox( 48 | height: 10, 49 | ), 50 | CardName(), 51 | ], 52 | ), 53 | ), 54 | ), 55 | Align( 56 | alignment: Alignment.bottomRight, 57 | child: Padding( 58 | padding: const EdgeInsets.all(8.0), 59 | child: Column( 60 | crossAxisAlignment: CrossAxisAlignment.end, 61 | mainAxisAlignment: MainAxisAlignment.end, 62 | children: [ 63 | Text( 64 | captions.getCaption('VALID_THRU')!.toUpperCase(), 65 | style: kTextStyle, 66 | ), 67 | SizedBox( 68 | height: 10, 69 | ), 70 | CardValid(), 71 | ], 72 | ), 73 | ), 74 | ) 75 | ], 76 | ), 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/components/input_view_pager.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/captions.dart'; 2 | import 'package:credit_card_input_form/util/util.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:credit_card_input_form/constants/constanst.dart'; 5 | import 'package:credit_card_input_form/provider/card_cvv_provider.dart'; 6 | import 'package:credit_card_input_form/provider/card_name_provider.dart'; 7 | import 'package:credit_card_input_form/provider/card_valid_provider.dart'; 8 | import 'package:credit_card_input_form/provider/state_provider.dart'; 9 | import 'package:flutter/services.dart'; 10 | import 'package:provider/provider.dart'; 11 | import 'package:credit_card_input_form/provider/card_number_provider.dart'; 12 | 13 | class InputViewPager extends StatefulWidget { 14 | final pageController; 15 | final isAutoFoucus; 16 | 17 | InputViewPager({this.pageController, this.isAutoFoucus}); 18 | 19 | @override 20 | _InputViewPagerState createState() => _InputViewPagerState(); 21 | } 22 | 23 | class _InputViewPagerState extends State { 24 | final List focusNodes = [ 25 | FocusNode(), 26 | FocusNode(), 27 | FocusNode(), 28 | FocusNode(), 29 | ]; 30 | 31 | @override 32 | void initState() { 33 | super.initState(); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | final captions = Provider.of(context); 39 | 40 | final titleMap = { 41 | 0: captions.getCaption('CARD_NUMBER'), 42 | 1: captions.getCaption('CARDHOLDER_NAME'), 43 | 2: captions.getCaption('VALID_THRU'), 44 | 3: captions.getCaption('SECURITY_CODE_CVC'), 45 | }; 46 | 47 | Provider.of(context).addListener(() { 48 | int index = Provider.of(context, listen: false) 49 | .getCurrentState()! 50 | .index; 51 | 52 | if (index < focusNodes.length) { 53 | FocusScope.of(context).requestFocus(focusNodes[index]); 54 | } else { 55 | FocusScope.of(context).unfocus(); 56 | SystemChannels.textInput.invokeMethod('TextInput.hide'); 57 | } 58 | }); 59 | 60 | return Container( 61 | height: 90, 62 | child: PageView.builder( 63 | physics: NeverScrollableScrollPhysics(), 64 | controller: widget.pageController, 65 | itemBuilder: (context, index) { 66 | return Padding( 67 | padding: const EdgeInsets.all(8.0), 68 | child: InputForm( 69 | isAutoFocus: widget.isAutoFoucus, 70 | focusNode: focusNodes[index], 71 | title: titleMap[index], 72 | index: index, 73 | pageController: widget.pageController), 74 | ); 75 | }, 76 | itemCount: titleMap.length)); 77 | } 78 | } 79 | 80 | class InputForm extends StatefulWidget { 81 | final String? title; 82 | final int? index; 83 | final PageController? pageController; 84 | final FocusNode? focusNode; 85 | final isAutoFocus; 86 | 87 | InputForm( 88 | {required this.title, 89 | this.index, 90 | this.pageController, 91 | this.focusNode, 92 | this.isAutoFocus}); 93 | 94 | @override 95 | _InputFormState createState() => _InputFormState(); 96 | } 97 | 98 | class _InputFormState extends State { 99 | var opacicy = 0.3; 100 | 101 | int? maxLength; 102 | TextInputType? textInputType; 103 | TextEditingController textController = TextEditingController(); 104 | 105 | void onChange() { 106 | setState(() { 107 | if (widget.index == widget.pageController!.page!.round()) { 108 | opacicy = 1; 109 | } else { 110 | opacicy = 0.3; 111 | } 112 | }); 113 | } 114 | 115 | String? value; 116 | 117 | @override 118 | void initState() { 119 | super.initState(); 120 | 121 | int index = Provider.of(context, listen: false) 122 | .getCurrentState()! 123 | .index; 124 | 125 | if (widget.index == index) { 126 | opacicy = 1; 127 | } 128 | 129 | widget.pageController!.addListener(onChange); 130 | 131 | if (widget.index == InputState.NUMBER.index) { 132 | maxLength = 19; 133 | textInputType = TextInputType.number; 134 | } else if (widget.index == InputState.NAME.index) { 135 | maxLength = 20; 136 | textInputType = TextInputType.text; 137 | } else if (widget.index == InputState.VALIDATE.index) { 138 | maxLength = 5; 139 | textInputType = TextInputType.number; 140 | } else if (widget.index == InputState.CVV.index) { 141 | String cardNumber = 142 | Provider.of(context, listen: false).cardNumber; 143 | 144 | if (CardCompany.AMERICAN_EXPRESS == detectCardCompany(cardNumber)) { 145 | maxLength = 4; 146 | } else { 147 | maxLength = 3; 148 | } 149 | textInputType = TextInputType.number; 150 | } 151 | } 152 | 153 | @override 154 | void dispose() { 155 | widget.pageController!.removeListener(onChange); 156 | 157 | super.dispose(); 158 | } 159 | 160 | var isInit = false; 161 | 162 | @override 163 | Widget build(BuildContext context) { 164 | String? textValue = ""; 165 | 166 | if (widget.index == InputState.NUMBER.index) { 167 | textValue = 168 | Provider.of(context, listen: false).cardNumber; 169 | } else if (widget.index == InputState.NAME.index) { 170 | textValue = 171 | Provider.of(context, listen: false).cardName; 172 | } else if (widget.index == InputState.VALIDATE.index) { 173 | textValue = 174 | Provider.of(context, listen: false).cardValid; 175 | } else if (widget.index == InputState.CVV.index) { 176 | textValue = Provider.of(context).cardCVV; 177 | } 178 | 179 | int index = Provider.of(context, listen: false) 180 | .getCurrentState()! 181 | .index; 182 | 183 | return Opacity( 184 | opacity: opacicy, 185 | child: Container( 186 | child: Column( 187 | crossAxisAlignment: CrossAxisAlignment.start, 188 | children: [ 189 | Text( 190 | widget.title!, 191 | style: TextStyle(fontSize: 12, color: Colors.black38), 192 | ), 193 | SizedBox( 194 | height: 5, 195 | ), 196 | TextField( 197 | autocorrect: false, 198 | autofocus: widget.isAutoFocus && widget.index == index, 199 | controller: textController 200 | ..value = textController.value.copyWith( 201 | text: textValue, 202 | selection: TextSelection.fromPosition( 203 | TextPosition(offset: textValue!.length), 204 | ), 205 | ), 206 | focusNode: widget.focusNode, 207 | keyboardType: textInputType, 208 | maxLength: maxLength, 209 | onChanged: (String newValue) { 210 | if (widget.index == InputState.NUMBER.index) { 211 | Provider.of(context, listen: false) 212 | .setNumber(newValue); 213 | } else if (widget.index == InputState.NAME.index) { 214 | Provider.of(context, listen: false) 215 | .setName(newValue); 216 | } else if (widget.index == InputState.VALIDATE.index) { 217 | Provider.of(context, listen: false) 218 | .setValid(newValue); 219 | } else if (widget.index == InputState.CVV.index) { 220 | Provider.of(context, listen: false) 221 | .setCVV(newValue); 222 | } 223 | }, 224 | decoration: InputDecoration( 225 | isDense: true, 226 | counter: SizedBox( 227 | height: 0, 228 | ), 229 | contentPadding: 230 | const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10), 231 | border: OutlineInputBorder( 232 | borderSide: BorderSide(width: 1, color: Colors.black38), 233 | borderRadius: BorderRadius.circular(5)), 234 | focusedBorder: OutlineInputBorder( 235 | borderSide: BorderSide(width: 1, color: Colors.black38), 236 | borderRadius: BorderRadius.circular(5)), 237 | ), 238 | ) 239 | ], 240 | ), 241 | ), 242 | ); 243 | } 244 | } 245 | -------------------------------------------------------------------------------- /lib/components/my_appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MyAppbar extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Row( 7 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 8 | children: [ 9 | IconButton( 10 | icon: Icon(Icons.clear, color: Colors.black), onPressed: null), 11 | Container( 12 | padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15), 13 | decoration: BoxDecoration( 14 | color: const Color(0xFFDADFE5), 15 | borderRadius: BorderRadius.circular(20)), 16 | child: Row( 17 | crossAxisAlignment: CrossAxisAlignment.center, 18 | children: [ 19 | Text( 20 | 'Scan your card ', 21 | style: 22 | TextStyle(color: Colors.black, fontWeight: FontWeight.bold), 23 | ), 24 | Icon(Icons.camera_alt) 25 | ], 26 | ), 27 | ) 28 | ], 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/components/reset_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/captions.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:provider/provider.dart'; 4 | 5 | class ResetButton extends StatefulWidget { 6 | final Function? onTap; 7 | final decoration; 8 | final textStyle; 9 | 10 | ResetButton({this.onTap, this.decoration, this.textStyle}); 11 | 12 | @override 13 | _ResetButtonState createState() => _ResetButtonState(); 14 | } 15 | 16 | class _ResetButtonState extends State { 17 | var pressed = false; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | final captions = Provider.of(context); 22 | 23 | return GestureDetector( 24 | onTap: widget.onTap as void Function()?, 25 | onTapDown: (_) { 26 | setState(() { 27 | pressed = true; 28 | }); 29 | }, 30 | onTapUp: (_) { 31 | setState(() { 32 | pressed = false; 33 | }); 34 | }, 35 | child: AnimatedContainer( 36 | margin: EdgeInsets.symmetric(horizontal: pressed ? 2.5 : 0), 37 | duration: Duration(milliseconds: 100), 38 | width: 95 - (pressed ? 5.0 : 0.0), 39 | height: 45 - (pressed ? 5.0 : 0.0), 40 | decoration: widget.decoration, 41 | child: Center( 42 | child: Row( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | children: [ 45 | Icon( 46 | Icons.refresh, 47 | color: Colors.white, 48 | ), 49 | Text(captions.getCaption('RESET')!, style: widget.textStyle) 50 | ], 51 | ), 52 | )), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/components/round_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:credit_card_input_form/constants/constanst.dart'; 3 | import 'package:credit_card_input_form/provider/state_provider.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | import '../constants/constanst.dart'; 7 | 8 | class RoundButton extends StatefulWidget { 9 | final Function? onTap; 10 | final buttonTitle; 11 | final decoration; 12 | final textStyle; 13 | 14 | RoundButton({this.onTap, this.buttonTitle, this.decoration, this.textStyle}); 15 | 16 | @override 17 | _RoundButtonState createState() => _RoundButtonState(); 18 | } 19 | 20 | class _RoundButtonState extends State { 21 | var pressed = false; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return GestureDetector( 26 | onTap: widget.onTap as void Function()?, 27 | onTapDown: (_) { 28 | final currentState = Provider.of(context, listen: false) 29 | .getCurrentState(); 30 | 31 | if (currentState == InputState.DONE) { 32 | return; 33 | } 34 | 35 | setState(() { 36 | pressed = true; 37 | }); 38 | }, 39 | onTapUp: (_) { 40 | final currentState = Provider.of(context, listen: false) 41 | .getCurrentState(); 42 | 43 | if (currentState == InputState.DONE) { 44 | return; 45 | } 46 | 47 | setState(() { 48 | pressed = false; 49 | }); 50 | }, 51 | child: AnimatedContainer( 52 | margin: EdgeInsets.symmetric(horizontal: pressed ? 2.5 : 0), 53 | duration: Duration(milliseconds: 100), 54 | width: 75 - (pressed ? 5.0 : 0.0), 55 | height: 40 - (pressed ? 5.0 : 0.0), 56 | decoration: widget.decoration, 57 | child: Center( 58 | child: Text(widget.buttonTitle, 59 | style: widget.textStyle.copyWith( 60 | color: !pressed 61 | ? widget.textStyle.color 62 | : widget.textStyle.color.withOpacity(0.2))), 63 | ), 64 | ), 65 | ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/components/yellow_border.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:credit_card_input_form/provider/card_name_provider.dart'; 3 | import 'package:credit_card_input_form/provider/state_provider.dart'; 4 | import 'package:credit_card_input_form/util/util.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | import 'package:credit_card_input_form/constants/constanst.dart'; 8 | 9 | class YellowBorder extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | final currentState = 13 | Provider.of(context, listen: true).getCurrentState(); 14 | 15 | final align = getAlign(currentState); 16 | final height = getHeight(currentState); 17 | final width = getWidth(context, currentState); 18 | final margin = getMargin(currentState); 19 | 20 | return AnimatedOpacity( 21 | opacity: currentState == InputState.DONE ? 0 : 1, 22 | duration: Duration(milliseconds: 300), 23 | child: AnimatedAlign( 24 | child: AnimatedContainer( 25 | margin: margin, 26 | duration: Duration(milliseconds: 150), 27 | decoration: BoxDecoration( 28 | borderRadius: BorderRadius.circular(7.5), 29 | border: Border.all( 30 | color: Colors.yellow, // <--- border color 31 | width: 1.0, 32 | ), 33 | ), 34 | height: height, 35 | width: width, 36 | ), 37 | alignment: align, 38 | duration: Duration(milliseconds: 300), 39 | ), 40 | ); 41 | } 42 | 43 | Alignment getAlign(currentState) { 44 | var align = Alignment.centerLeft; 45 | switch (currentState) { 46 | case InputState.NUMBER: 47 | align = Alignment.centerLeft; 48 | break; 49 | case InputState.NAME: 50 | align = Alignment.bottomLeft; 51 | break; 52 | case InputState.CVV: 53 | case InputState.VALIDATE: 54 | case InputState.DONE: 55 | align = Alignment.bottomRight; 56 | break; 57 | } 58 | return align; 59 | } 60 | 61 | double getHeight(InputState? currentState) { 62 | var height = 0.0; 63 | switch (currentState) { 64 | case InputState.NUMBER: 65 | height = textSize('1234 5678 1234', kCardNumberTextStyle).height + 15; 66 | break; 67 | case InputState.NAME: 68 | height = textSize('hello world', kNametextStyle).height + 15; 69 | break; 70 | case InputState.CVV: 71 | case InputState.VALIDATE: 72 | case InputState.DONE: 73 | height = textSize('12/12', kNametextStyle).height + 15; 74 | break; 75 | } 76 | return height; 77 | } 78 | 79 | double getWidth(context, currentState) { 80 | var width = 330.0; 81 | switch (currentState) { 82 | case InputState.NUMBER: 83 | width = 84 | textSize('XXXX XXXX XXXX XXXX', kCardDefaultTextStyle).width + 10; 85 | break; 86 | case InputState.NAME: 87 | String name = Provider.of(context).cardName; 88 | if (name.isEmpty) { 89 | name = 'NAME SURNAME'; 90 | } 91 | width = textSize(name.toUpperCase(), kNametextStyle).width + 10; 92 | break; 93 | case InputState.CVV: 94 | case InputState.VALIDATE: 95 | width = textSize('MM/YY', kNametextStyle).width + 10; 96 | break; 97 | } 98 | return width; 99 | } 100 | 101 | getMargin(InputState? currentState) { 102 | var lefrMargin = 0.0; 103 | var rightMargin = 0.0; 104 | switch (currentState) { 105 | case InputState.NUMBER: 106 | break; 107 | case InputState.NAME: 108 | lefrMargin = 2.5; 109 | break; 110 | case InputState.CVV: 111 | case InputState.DONE: 112 | break; 113 | case InputState.VALIDATE: 114 | rightMargin = 3; 115 | 116 | break; 117 | } 118 | return EdgeInsets.only(left: lefrMargin, right: rightMargin); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/constants/captions.dart: -------------------------------------------------------------------------------- 1 | class Captions { 2 | final Map _default = { 3 | 'PREV': 'Prev', 4 | 'NEXT': 'Next', 5 | 'DONE': 'Done', 6 | 'CARD_NUMBER': 'Card Number', 7 | 'CARDHOLDER_NAME': 'Cardholder Name', 8 | 'VALID_THRU': 'Valid Thru', 9 | 'SECURITY_CODE_CVC': 'Security Code (CVC)', 10 | 'NAME_SURNAME': 'Name Surname', 11 | 'MM_YY': 'MM/YY', 12 | 'RESET': 'Reset', 13 | }; 14 | 15 | late Map _captions; 16 | 17 | Captions({customCaptions}) { 18 | _captions = {}; 19 | _captions.addAll(_default); 20 | if (customCaptions != null) _captions.addAll(customCaptions); 21 | } 22 | 23 | String? getCaption(String key) { 24 | return _captions.containsKey(key) ? _captions[key] : key; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/constants/constanst.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | final kCardNumberTextStyle = TextStyle( 4 | color: Colors.white, 5 | fontFamily: 'U and I', 6 | fontWeight: FontWeight.bold, 7 | package: 'credit_card_input_form', 8 | letterSpacing: 1.5, 9 | fontSize: 25, 10 | ); 11 | 12 | final kCardDefaultTextStyle = TextStyle( 13 | color: Colors.grey, 14 | fontFamily: 'U and I', 15 | package: 'credit_card_input_form', 16 | fontSize: 25, 17 | letterSpacing: 1, 18 | ); 19 | 20 | final kCVCTextStyle = TextStyle( 21 | color: Colors.black, 22 | fontFamily: 'Satisfy', 23 | fontWeight: FontWeight.bold, 24 | package: 'credit_card_input_form', 25 | fontSize: 20, 26 | ); 27 | 28 | final kTextStyle = TextStyle( 29 | fontSize: 8, 30 | fontWeight: FontWeight.bold, 31 | color: Colors.white, 32 | fontFamily: 'U and I', 33 | package: 'credit_card_input_form', 34 | ); 35 | 36 | const kNametextStyle = TextStyle( 37 | fontSize: 15, 38 | color: Colors.white, 39 | fontFamily: 'U and I', 40 | package: 'credit_card_input_form', 41 | ); 42 | 43 | const kDefaultNameTextStyle = TextStyle( 44 | fontSize: 15, 45 | color: Colors.grey, 46 | fontFamily: 'U and I', 47 | package: 'credit_card_input_form', 48 | ); 49 | 50 | const kValidtextStyle = TextStyle( 51 | fontSize: 15, 52 | letterSpacing: 2, 53 | color: Colors.white, 54 | package: 'credit_card_input_form', 55 | fontFamily: 'U and I', 56 | ); 57 | 58 | const kDefaultValidTextStyle = TextStyle( 59 | fontSize: 15, 60 | color: Colors.grey, 61 | fontFamily: 'U and I', 62 | package: 'credit_card_input_form', 63 | ); 64 | 65 | const kSignTextStyle = TextStyle( 66 | fontSize: 20, 67 | color: Colors.white, 68 | fontFamily: 'Satisfy', 69 | package: 'credit_card_input_form', 70 | ); 71 | 72 | const kDefaultButtonTextStyle = 73 | TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15); 74 | 75 | const defaultNextPrevButtonDecoration = BoxDecoration( 76 | boxShadow: [ 77 | BoxShadow(color: Colors.black54, blurRadius: 5.0, offset: Offset(0, 5)) 78 | ], 79 | borderRadius: BorderRadius.only( 80 | topLeft: Radius.circular(30), 81 | bottomLeft: Radius.circular(30), 82 | bottomRight: Radius.circular(30)), 83 | gradient: LinearGradient( 84 | colors: [ 85 | const Color(0xff6c16c7), 86 | const Color(0xFFB16B92), 87 | ], 88 | begin: const FractionalOffset(0.0, 0.0), 89 | end: const FractionalOffset(1.0, 0.0), 90 | stops: [0.0, 1.0], 91 | tileMode: TileMode.clamp), 92 | ); 93 | 94 | const defaultResetButtonDecoration = BoxDecoration( 95 | boxShadow: [ 96 | BoxShadow(color: Colors.black54, blurRadius: 5.0, offset: Offset(0, 5)) 97 | ], 98 | borderRadius: BorderRadius.all(Radius.circular(30)), 99 | gradient: LinearGradient( 100 | colors: [ 101 | const Color(0xff6c16c7), 102 | const Color(0xFFB16B92), 103 | ], 104 | begin: const FractionalOffset(0.0, 0.0), 105 | end: const FractionalOffset(1.0, 0.0), 106 | stops: [0.0, 1.0], 107 | tileMode: TileMode.clamp), 108 | ); 109 | 110 | const defaultCardDecoration = BoxDecoration( 111 | boxShadow: [ 112 | BoxShadow(color: Colors.black54, blurRadius: 15.0, offset: Offset(0, 8)) 113 | ], 114 | color: Color(0xFF5D5D5E), 115 | borderRadius: BorderRadius.all(Radius.circular(15))); 116 | 117 | enum InputState { NUMBER, NAME, VALIDATE, CVV, DONE } 118 | 119 | enum CardCompany { VISA, MASTER, AMERICAN_EXPRESS, DISCOVER, OTHER } 120 | -------------------------------------------------------------------------------- /lib/credit_card_input_form.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/components/reset_button.dart'; 2 | import 'package:flip_card/flip_card.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | import 'package:credit_card_input_form/components/back_card_view.dart'; 6 | import 'package:credit_card_input_form/components/front_card_view.dart'; 7 | import 'package:credit_card_input_form/components/input_view_pager.dart'; 8 | import 'package:credit_card_input_form/components/round_button.dart'; 9 | import 'package:credit_card_input_form/constants/constanst.dart'; 10 | import 'package:credit_card_input_form/model/card_info.dart'; 11 | import 'package:credit_card_input_form/provider/card_cvv_provider.dart'; 12 | import 'package:credit_card_input_form/provider/card_name_provider.dart'; 13 | import 'package:credit_card_input_form/provider/card_number_provider.dart'; 14 | import 'package:credit_card_input_form/provider/card_valid_provider.dart'; 15 | import 'package:credit_card_input_form/provider/state_provider.dart'; 16 | import 'package:provider/provider.dart'; 17 | 18 | import 'constants/captions.dart'; 19 | import 'constants/constanst.dart'; 20 | 21 | typedef CardInfoCallback = void Function( 22 | InputState currentState, CardInfo cardInfo); 23 | 24 | class CreditCardInputForm extends StatelessWidget { 25 | CreditCardInputForm( 26 | {this.onStateChange, 27 | this.cardHeight, 28 | this.frontCardDecoration, 29 | this.backCardDecoration, 30 | this.showResetButton = true, 31 | this.customCaptions, 32 | this.cardNumber = '', 33 | this.cardName = '', 34 | this.cardCVV = '', 35 | this.cardValid = '', 36 | this.initialAutoFocus = true, 37 | this.intialCardState = InputState.NUMBER, 38 | this.nextButtonTextStyle = kDefaultButtonTextStyle, 39 | this.prevButtonTextStyle = kDefaultButtonTextStyle, 40 | this.resetButtonTextStyle = kDefaultButtonTextStyle, 41 | this.nextButtonDecoration = defaultNextPrevButtonDecoration, 42 | this.prevButtonDecoration = defaultNextPrevButtonDecoration, 43 | this.resetButtonDecoration = defaultResetButtonDecoration}); 44 | 45 | final Function? onStateChange; 46 | final double? cardHeight; 47 | final BoxDecoration? frontCardDecoration; 48 | final BoxDecoration? backCardDecoration; 49 | final bool showResetButton; 50 | final Map? customCaptions; 51 | final BoxDecoration nextButtonDecoration; 52 | final BoxDecoration prevButtonDecoration; 53 | final BoxDecoration resetButtonDecoration; 54 | final TextStyle nextButtonTextStyle; 55 | final TextStyle prevButtonTextStyle; 56 | final TextStyle resetButtonTextStyle; 57 | final String cardNumber; 58 | final String cardName; 59 | final String cardCVV; 60 | final String cardValid; 61 | final initialAutoFocus; 62 | final InputState intialCardState; 63 | 64 | @override 65 | Widget build(BuildContext context) { 66 | return MultiProvider( 67 | providers: [ 68 | ChangeNotifierProvider( 69 | create: (context) => StateProvider(intialCardState), 70 | ), 71 | ChangeNotifierProvider( 72 | create: (context) => CardNumberProvider(cardNumber), 73 | ), 74 | ChangeNotifierProvider( 75 | create: (context) => CardNameProvider(cardName), 76 | ), 77 | ChangeNotifierProvider( 78 | create: (context) => CardValidProvider(cardValid), 79 | ), 80 | ChangeNotifierProvider( 81 | create: (context) => CardCVVProvider(cardCVV), 82 | ), 83 | Provider( 84 | create: (_) => Captions(customCaptions: customCaptions), 85 | ), 86 | ], 87 | child: CreditCardInputImpl( 88 | onCardModelChanged: 89 | onStateChange as void Function(InputState, CardInfo)?, 90 | backDecoration: backCardDecoration, 91 | frontDecoration: frontCardDecoration, 92 | cardHeight: cardHeight, 93 | initialAutoFocus: initialAutoFocus, 94 | showResetButton: showResetButton, 95 | prevButtonDecoration: prevButtonDecoration, 96 | nextButtonDecoration: nextButtonDecoration, 97 | resetButtonDecoration: resetButtonDecoration, 98 | prevButtonTextStyle: prevButtonTextStyle, 99 | nextButtonTextStyle: nextButtonTextStyle, 100 | resetButtonTextStyle: resetButtonTextStyle, 101 | initialCardState: intialCardState, 102 | ), 103 | ); 104 | } 105 | } 106 | 107 | class CreditCardInputImpl extends StatefulWidget { 108 | final CardInfoCallback? onCardModelChanged; 109 | final double? cardHeight; 110 | final BoxDecoration? frontDecoration; 111 | final BoxDecoration? backDecoration; 112 | final bool? showResetButton; 113 | final BoxDecoration? nextButtonDecoration; 114 | final BoxDecoration? prevButtonDecoration; 115 | final BoxDecoration? resetButtonDecoration; 116 | final TextStyle? nextButtonTextStyle; 117 | final TextStyle? prevButtonTextStyle; 118 | final TextStyle? resetButtonTextStyle; 119 | final InputState? initialCardState; 120 | final initialAutoFocus; 121 | 122 | CreditCardInputImpl( 123 | {this.onCardModelChanged, 124 | this.cardHeight, 125 | this.showResetButton, 126 | this.frontDecoration, 127 | this.backDecoration, 128 | this.nextButtonTextStyle, 129 | this.prevButtonTextStyle, 130 | this.resetButtonTextStyle, 131 | this.nextButtonDecoration, 132 | this.prevButtonDecoration, 133 | this.initialCardState, 134 | this.initialAutoFocus, 135 | this.resetButtonDecoration}); 136 | 137 | @override 138 | _CreditCardInputImplState createState() => _CreditCardInputImplState(); 139 | } 140 | 141 | class _CreditCardInputImplState extends State { 142 | PageController? pageController; 143 | 144 | final GlobalKey cardKey = GlobalKey(); 145 | 146 | final cardHorizontalpadding = 12; 147 | final cardRatio = 16.0 / 9.0; 148 | 149 | var _currentState; 150 | 151 | @override 152 | void initState() { 153 | super.initState(); 154 | 155 | _currentState = widget.initialCardState; 156 | 157 | pageController = PageController( 158 | viewportFraction: 0.92, 159 | initialPage: widget.initialCardState!.index, 160 | ); 161 | } 162 | 163 | @override 164 | Widget build(BuildContext context) { 165 | final newState = Provider.of(context).getCurrentState(); 166 | 167 | final name = Provider.of(context).cardName; 168 | 169 | final cardNumber = Provider.of(context).cardNumber; 170 | 171 | final valid = Provider.of(context).cardValid; 172 | 173 | final cvv = Provider.of(context).cardCVV; 174 | 175 | final captions = Provider.of(context); 176 | 177 | if (newState != _currentState) { 178 | _currentState = newState; 179 | 180 | Future(() { 181 | widget.onCardModelChanged!( 182 | _currentState, 183 | CardInfo( 184 | name: name, cardNumber: cardNumber, validate: valid, cvv: cvv)); 185 | }); 186 | } 187 | 188 | double cardWidth = 189 | MediaQuery.of(context).size.width - (2 * cardHorizontalpadding); 190 | 191 | double? cardHeight; 192 | if (widget.cardHeight != null && widget.cardHeight! > 0) { 193 | cardHeight = widget.cardHeight; 194 | } else { 195 | cardHeight = cardWidth / cardRatio; 196 | } 197 | 198 | final frontDecoration = widget.frontDecoration != null 199 | ? widget.frontDecoration 200 | : defaultCardDecoration; 201 | final backDecoration = widget.backDecoration != null 202 | ? widget.backDecoration 203 | : defaultCardDecoration; 204 | 205 | return Column( 206 | crossAxisAlignment: CrossAxisAlignment.stretch, 207 | children: [ 208 | Padding( 209 | padding: const EdgeInsets.symmetric(horizontal: 12), 210 | child: FlipCard( 211 | speed: 300, 212 | flipOnTouch: _currentState == InputState.DONE, 213 | key: cardKey, 214 | front: 215 | FrontCardView(height: cardHeight, decoration: frontDecoration), 216 | back: BackCardView(height: cardHeight, decoration: backDecoration), 217 | ), 218 | ), 219 | Stack( 220 | children: [ 221 | AnimatedOpacity( 222 | opacity: _currentState == InputState.DONE ? 0 : 1, 223 | duration: Duration(milliseconds: 500), 224 | child: InputViewPager( 225 | isAutoFoucus: widget.initialAutoFocus, 226 | pageController: pageController, 227 | ), 228 | ), 229 | Align( 230 | alignment: Alignment.center, 231 | child: AnimatedOpacity( 232 | opacity: widget.showResetButton! && 233 | _currentState == InputState.DONE 234 | ? 1 235 | : 0, 236 | duration: Duration(milliseconds: 500), 237 | child: Padding( 238 | padding: const EdgeInsets.all(8.0), 239 | child: ResetButton( 240 | decoration: widget.resetButtonDecoration, 241 | textStyle: widget.resetButtonTextStyle, 242 | onTap: () { 243 | if (!widget.showResetButton!) { 244 | return; 245 | } 246 | 247 | Provider.of(context, listen: false) 248 | .moveFirstState(); 249 | pageController!.animateToPage(0, 250 | duration: Duration(milliseconds: 300), 251 | curve: Curves.easeIn); 252 | 253 | if (!cardKey.currentState!.isFront) { 254 | cardKey.currentState!.toggleCard(); 255 | } 256 | }, 257 | ), 258 | ))), 259 | ], 260 | ), 261 | Row(mainAxisAlignment: MainAxisAlignment.end, children: [ 262 | AnimatedOpacity( 263 | opacity: _currentState == InputState.NUMBER || 264 | _currentState == InputState.DONE 265 | ? 0 266 | : 1, 267 | duration: Duration(milliseconds: 500), 268 | child: RoundButton( 269 | decoration: widget.prevButtonDecoration, 270 | textStyle: widget.prevButtonTextStyle, 271 | buttonTitle: captions.getCaption('PREV'), 272 | onTap: () { 273 | if (InputState.DONE == _currentState) { 274 | return; 275 | } 276 | 277 | if (InputState.NUMBER != _currentState) { 278 | pageController!.previousPage( 279 | duration: Duration(milliseconds: 300), 280 | curve: Curves.easeIn); 281 | } 282 | 283 | if (InputState.CVV == _currentState) { 284 | cardKey.currentState!.toggleCard(); 285 | } 286 | Provider.of(context, listen: false) 287 | .movePrevState(); 288 | }), 289 | ), 290 | SizedBox( 291 | width: 10, 292 | ), 293 | AnimatedOpacity( 294 | opacity: _currentState == InputState.DONE ? 0 : 1, 295 | duration: Duration(milliseconds: 500), 296 | child: RoundButton( 297 | decoration: widget.nextButtonDecoration, 298 | textStyle: widget.nextButtonTextStyle, 299 | buttonTitle: _currentState == InputState.CVV || 300 | _currentState == InputState.DONE 301 | ? captions.getCaption('DONE') 302 | : captions.getCaption('NEXT'), 303 | onTap: () { 304 | if (InputState.CVV != _currentState) { 305 | pageController!.nextPage( 306 | duration: Duration(milliseconds: 300), 307 | curve: Curves.easeIn); 308 | } 309 | 310 | if (InputState.VALIDATE == _currentState) { 311 | cardKey.currentState!.toggleCard(); 312 | } 313 | 314 | Provider.of(context, listen: false) 315 | .moveNextState(); 316 | }), 317 | ), 318 | SizedBox( 319 | width: 25, 320 | ) 321 | ]) 322 | ], 323 | ); 324 | } 325 | } 326 | -------------------------------------------------------------------------------- /lib/model/card_info.dart: -------------------------------------------------------------------------------- 1 | class CardInfo { 2 | String? cardNumber; 3 | String? name; 4 | String? validate; 5 | String? cvv; 6 | 7 | CardInfo({this.cardNumber, this.name, this.validate, this.cvv}); 8 | 9 | @override 10 | String toString() { 11 | return "cardNumber=$cardNumber, name=$name, validate=$validate, cvv=$cvv"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/provider/card_cvv_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardCVVProvider with ChangeNotifier { 4 | var _cardCVV; 5 | 6 | CardCVVProvider(initValue) { 7 | _cardCVV = initValue; 8 | } 9 | 10 | void setCVV(String cvv) { 11 | _cardCVV = cvv; 12 | notifyListeners(); 13 | } 14 | 15 | get cardCVV => _cardCVV; 16 | } 17 | -------------------------------------------------------------------------------- /lib/provider/card_name_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardNameProvider with ChangeNotifier { 4 | var _cardName; 5 | 6 | CardNameProvider(initValue) { 7 | _cardName = initValue; 8 | } 9 | 10 | void setName(String name) { 11 | _cardName = name; 12 | notifyListeners(); 13 | } 14 | 15 | get cardName => _cardName; 16 | } 17 | -------------------------------------------------------------------------------- /lib/provider/card_number_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardNumberProvider with ChangeNotifier { 4 | var _cardNumber; 5 | 6 | CardNumberProvider(initValue) { 7 | _cardNumber = addSpaceToCardNumber(initValue); 8 | } 9 | 10 | void setNumber(String newValue) { 11 | _cardNumber = addSpaceToCardNumber(newValue); 12 | 13 | notifyListeners(); 14 | } 15 | 16 | String addSpaceToCardNumber(String newValue) { 17 | newValue = newValue.replaceAll(RegExp(r'[^0-9]'), ''); 18 | 19 | if (newValue.isNotEmpty && newValue[newValue.length - 1] == ' ') { 20 | return newValue.substring(0, newValue.length - 1); 21 | } else { 22 | newValue = newValue.replaceAll(" ", ""); 23 | String cardNumber = ""; 24 | 25 | for (int i = 1; i <= newValue.length; i++) { 26 | cardNumber = cardNumber + newValue[i - 1]; 27 | if (i % 4 == 0 && i != newValue.length) { 28 | cardNumber = cardNumber + ' '; 29 | } 30 | } 31 | return cardNumber; 32 | } 33 | } 34 | 35 | get cardNumber => _cardNumber; 36 | } 37 | -------------------------------------------------------------------------------- /lib/provider/card_valid_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardValidProvider with ChangeNotifier { 4 | var _cardValid; 5 | 6 | CardValidProvider(initValue) { 7 | _cardValid = initValue; 8 | } 9 | 10 | void setValid(String newValue) { 11 | if (newValue.length == 3) { 12 | if (newValue.contains("/")) { 13 | _cardValid = newValue.substring(0, 2); 14 | } else { 15 | _cardValid = newValue.substring(0, 2) + "/" + newValue.substring(2); 16 | } 17 | } else { 18 | _cardValid = newValue; 19 | } 20 | notifyListeners(); 21 | } 22 | 23 | get cardValid => _cardValid; 24 | } 25 | -------------------------------------------------------------------------------- /lib/provider/state_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:credit_card_input_form/constants/constanst.dart'; 3 | 4 | class StateProvider with ChangeNotifier { 5 | InputState? _currentState; 6 | 7 | StateProvider(initValue) { 8 | _currentState = initValue; 9 | } 10 | 11 | final _states = [ 12 | InputState.NUMBER, 13 | InputState.NAME, 14 | InputState.VALIDATE, 15 | InputState.CVV, 16 | InputState.DONE 17 | ]; 18 | 19 | void moveNextState() { 20 | if (_currentState!.index < _states.length - 1) { 21 | _currentState = _states[_currentState!.index + 1]; 22 | notifyListeners(); 23 | } 24 | } 25 | 26 | void moveFirstState() { 27 | _currentState = _states[0]; 28 | notifyListeners(); 29 | } 30 | 31 | void movePrevState() { 32 | if (_currentState!.index > 0) { 33 | _currentState = _states[_currentState!.index - 1]; 34 | notifyListeners(); 35 | } 36 | } 37 | 38 | InputState? getCurrentState() { 39 | return _currentState; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/util/util.dart: -------------------------------------------------------------------------------- 1 | import 'package:credit_card_input_form/constants/constanst.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Size textSize(String text, TextStyle style) { 5 | final TextPainter textPainter = TextPainter( 6 | text: TextSpan(text: text, style: style), 7 | maxLines: 1, 8 | textDirection: TextDirection.ltr) 9 | ..layout(minWidth: 0, maxWidth: double.infinity); 10 | return textPainter.size; 11 | } 12 | 13 | final master = Image.asset('images/mastercard.png', 14 | width: 50, package: 'credit_card_input_form'); 15 | final visa = Image.asset('images/visacard.png', 16 | width: 50, package: 'credit_card_input_form'); 17 | final discover = Image.asset('images/discover.png', 18 | width: 50, package: 'credit_card_input_form'); 19 | 20 | final amex = Image.asset('images/amex.png', 21 | width: 50, package: 'credit_card_input_form'); 22 | 23 | final others = Container(); 24 | 25 | final Map>> cardNumPatterns = 26 | >>{ 27 | CardCompany.VISA: >{ 28 | ['4'], 29 | }, 30 | CardCompany.AMERICAN_EXPRESS: >{ 31 | ['34'], 32 | ['37'], 33 | }, 34 | CardCompany.DISCOVER: >{ 35 | ['6011'], 36 | ['622126', '622925'], 37 | ['644', '649'], 38 | ['65'] 39 | }, 40 | CardCompany.MASTER: >{ 41 | ['51', '55'], 42 | ['2221', '2229'], 43 | ['223', '229'], 44 | ['23', '26'], 45 | ['270', '271'], 46 | ['2720'], 47 | }, 48 | }; 49 | 50 | CardCompany detectCardCompany(String cardNumber) { 51 | //Default card type is other 52 | CardCompany cardType = CardCompany.OTHER; 53 | 54 | if (cardNumber.isEmpty) { 55 | return cardType; 56 | } 57 | 58 | cardNumPatterns.forEach( 59 | (CardCompany type, Set> patterns) { 60 | for (List patternRange in patterns) { 61 | String ccPatternStr = cardNumber.replaceAll(RegExp(r'\s+\b|\b\s'), ''); 62 | final int rangeLen = patternRange[0].length; 63 | if (rangeLen < cardNumber.length) { 64 | ccPatternStr = ccPatternStr.substring(0, rangeLen); 65 | } 66 | 67 | if (patternRange.length > 1) { 68 | final int ccPrefixAsInt = int.parse(ccPatternStr); 69 | final int startPatternPrefixAsInt = int.parse(patternRange[0]); 70 | final int endPatternPrefixAsInt = int.parse(patternRange[1]); 71 | if (ccPrefixAsInt >= startPatternPrefixAsInt && 72 | ccPrefixAsInt <= endPatternPrefixAsInt) { 73 | cardType = type; 74 | break; 75 | } 76 | } else { 77 | if (ccPatternStr == patternRange[0]) { 78 | cardType = type; 79 | break; 80 | } 81 | } 82 | } 83 | }, 84 | ); 85 | 86 | return cardType; 87 | } 88 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | fake_async: 47 | dependency: transitive 48 | description: 49 | name: fake_async 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.0" 53 | flip_card: 54 | dependency: "direct main" 55 | description: 56 | name: flip_card 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "0.5.0" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_test: 66 | dependency: "direct dev" 67 | description: flutter 68 | source: sdk 69 | version: "0.0.0" 70 | matcher: 71 | dependency: transitive 72 | description: 73 | name: matcher 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "0.12.10" 77 | meta: 78 | dependency: transitive 79 | description: 80 | name: meta 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "1.3.0" 84 | nested: 85 | dependency: transitive 86 | description: 87 | name: nested 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.0.0" 91 | path: 92 | dependency: transitive 93 | description: 94 | name: path 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.8.0" 98 | provider: 99 | dependency: "direct main" 100 | description: 101 | name: provider 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "5.0.0" 105 | sky_engine: 106 | dependency: transitive 107 | description: flutter 108 | source: sdk 109 | version: "0.0.99" 110 | source_span: 111 | dependency: transitive 112 | description: 113 | name: source_span 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.8.0" 117 | stack_trace: 118 | dependency: transitive 119 | description: 120 | name: stack_trace 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.10.0" 124 | stream_channel: 125 | dependency: transitive 126 | description: 127 | name: stream_channel 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "2.1.0" 131 | string_scanner: 132 | dependency: transitive 133 | description: 134 | name: string_scanner 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.1.0" 138 | term_glyph: 139 | dependency: transitive 140 | description: 141 | name: term_glyph 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.2.0" 145 | test_api: 146 | dependency: transitive 147 | description: 148 | name: test_api 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "0.2.19" 152 | typed_data: 153 | dependency: transitive 154 | description: 155 | name: typed_data 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.3.0" 159 | vector_math: 160 | dependency: transitive 161 | description: 162 | name: vector_math 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.1.0" 166 | sdks: 167 | dart: ">=2.12.0 <3.0.0" 168 | flutter: ">=1.16.0" 169 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: credit_card_input_form 2 | description: This package provides visually beautiful UX through animation of credit card information input form. 3 | version: 2.3.0 4 | homepage: https://github.com/Origogi/Flutter-Credit-Card-Input-Form 5 | 6 | 7 | environment: 8 | sdk: '>=2.12.0 <3.0.0' 9 | flutter: ">=1.10.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | provider: ^5.0.0 15 | flip_card: ^0.5.0 16 | 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | 22 | flutter: 23 | uses-material-design: true 24 | 25 | plugin: 26 | platforms: 27 | android: 28 | package: com.origogi.credit_card_input_form 29 | pluginClass: CreditCardInputFormPlugin 30 | ios: 31 | pluginClass: CreditCardInputFormPlugin 32 | fonts: 33 | - family: U and I 34 | fonts: 35 | - asset: fonts/fontYouandiModernTR.ttf 36 | - family: Satisfy 37 | fonts: 38 | - asset: fonts/Satisfy-Regular.ttf 39 | 40 | assets: 41 | - images/ 42 | 43 | 44 | 45 | 46 | 47 | --------------------------------------------------------------------------------