{"id":13549128,"url":"https://github.com/SimformSolutionsPvtLtd/flutter_credit_card","last_synced_at":"2025-04-02T22:31:29.283Z","repository":{"id":36989011,"uuid":"183008295","full_name":"SimformSolutionsPvtLtd/flutter_credit_card","owner":"SimformSolutionsPvtLtd","description":"A credit card widget for Flutter application.","archived":false,"fork":false,"pushed_at":"2025-02-24T10:45:47.000Z","size":55280,"stargazers_count":467,"open_issues_count":12,"forks_count":288,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-24T11:39:52.262Z","etag":null,"topics":["android","creditcard","dart","flutter","flutter-plugin","ios"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_credit_card","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimformSolutionsPvtLtd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-23T12:17:43.000Z","updated_at":"2025-02-19T07:33:46.000Z","dependencies_parsed_at":"2024-03-16T20:26:09.027Z","dependency_job_id":"3931411f-c275-4904-ba5e-1d6d804d7ee0","html_url":"https://github.com/SimformSolutionsPvtLtd/flutter_credit_card","commit_stats":null,"previous_names":["simformsolutions/flutter_credit_card"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Fflutter_credit_card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Fflutter_credit_card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Fflutter_credit_card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Fflutter_credit_card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimformSolutionsPvtLtd","download_url":"https://codeload.github.com/SimformSolutionsPvtLtd/flutter_credit_card/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905105,"owners_count":20852812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","creditcard","dart","flutter","flutter-plugin","ios"],"created_at":"2024-08-01T12:01:18.571Z","updated_at":"2025-04-02T22:31:24.272Z","avatar_url":"https://github.com/SimformSolutionsPvtLtd.png","language":"Dart","funding_links":[],"categories":["Dart","Flutter"],"sub_categories":["Jetpack-Compose"],"readme":"![banner](https://github.com/simformsolutions/flutter_credit_card/blob/master/readme_assets/banner.png?raw=true)\n\n# Flutter Credit Card\n\n![build](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/workflows/Build/badge.svg?branch=master)\n[![flutter_credit_card](https://img.shields.io/pub/v/flutter_credit_card?label=flutter_credit_card)](https://pub.dev/packages/flutter_credit_card)\n\nA Flutter package allows you to easily implement the Credit card's UI easily with the Card detection.\n\n## Preview\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cfigcaption\u003e\u003cb\u003eGlassmorphism and Card Background\u003c/b\u003e\u003c/figcaption\u003e\n                \u003chr/\u003e\n                \u003cimg src=\"https://raw.githubusercontent.com/SimformSolutionsPvtLtd/flutter_credit_card/master/readme_assets/preview.gif\" alt=\"The example app showing credit card widget\" width=\"227\"/\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cfigcaption\u003e\u003cb\u003eFloating Card on Mobile\u003c/b\u003e\u003c/figcaption\u003e\n                \u003chr/\u003e\n                \u003cimg src=\"https://raw.githubusercontent.com/SimformSolutionsPvtLtd/flutter_credit_card/master/readme_assets/credit_card_float_preview.gif\" alt=\"The example app showing card floating animation in mobile\" width=\"227\"/\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cfigcaption\u003e\u003cb\u003eFloating Card on Web\u003c/b\u003e\u003c/figcaption\u003e\n                \u003chr/\u003e\n                \u003cimg src=\"https://raw.githubusercontent.com/SimformSolutionsPvtLtd/flutter_credit_card/master/readme_assets/credit_card_float_cursor_preview.gif\" alt=\"The example app showing card floating animation in web\" width=\"227\"/\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Migration guide for Version 4.x.x\n- The `themeColor`, `textColor`, and `cursorColor` properties have been removed from `CreditCardForm` due to changes in how it detects and applies application themes. Please check out the example app to learn how to apply those using `Theme`.\n- The `cardNumberDecoration`, `expiryDateDecoration`, `cvvCodeDecoration`, and `cardHolderDecoration` properties are moved to the newly added `InputDecoration` class that also has `textStyle` properties for all the textFields of the `CreditCardForm`.\n\n\n## Installing\n\n1.  Add dependency to `pubspec.yaml`\n\n    Get the latest version from the 'Installing' tab on [pub.dev](https://pub.dev/packages/flutter_credit_card/install)\n    \n```dart\ndependencies:\n    flutter_credit_card: \u003clatest_version\u003e\n```\n\n2.  Import the package\n```dart\nimport 'package:flutter_credit_card/flutter_credit_card.dart';\n```\n\n3.  Adding CreditCardWidget\n\n*With required parameters*\n```dart\n    CreditCardWidget(\n      cardNumber: cardNumber,\n      expiryDate: expiryDate,\n      cardHolderName: cardHolderName,\n      cvvCode: cvvCode,\n      showBackView: isCvvFocused, //true when you want to show cvv(back) view\n      onCreditCardWidgetChange: (CreditCardBrand brand) {}, // Callback for anytime credit card brand is changed\n    ),\n```    \n\n*With optional parameters*\n```dart   \n    CreditCardWidget(\n      cardNumber: cardNumber,\n      expiryDate: expiryDate,\n      cardHolderName: cardHolderName,\n      cvvCode: cvvCode,\n      showBackView: isCvvFocused,\n      onCreditCardWidgetChange: (CreditCardBrand brand) {},\n      bankName: 'Name of the Bank',\n      cardBgColor: Colors.black87,\n      glassmorphismConfig: Glassmorphism.defaultConfig(),\n      enableFloatingCard: true,\n      floatingConfig: FloatingConfig(\n        isGlareEnabled: true,\n        isShadowEnabled: true,\n        shadowConfig: FloatingShadowConfig(),\n      ),\n      backgroundImage: 'assets/card_bg.png',\n      backgroundNetworkImage: 'https://www.xyz.com/card_bg.png',\n      labelValidThru: 'VALID\\nTHRU',\n      obscureCardNumber: true,\n      obscureInitialCardNumber: false,\n      obscureCardCvv: true,\n      labelCardHolder: 'CARD HOLDER',\n      labelValidThru: 'VALID\\nTHRU',\n      cardType: CardType.mastercard,\n      isHolderNameVisible: false,\n      height: 175,\n      textStyle: TextStyle(color: Colors.yellowAccent),\n      width: MediaQuery.of(context).size.width,\n      isChipVisible: true,\n      isSwipeGestureEnabled: true,\n      animationDuration: Duration(milliseconds: 1000),\n      frontCardBorder: Border.all(color: Colors.grey),\n      backCardBorder: Border.all(color: Colors.grey),\n      chipColor: Colors.red,\n      padding: 16,\n      customCardTypeIcons: \u003cCustomCardTypeIcons\u003e[\n        CustomCardTypeIcons(\n          cardType: CardType.mastercard,\n          cardImage: Image.asset(\n            'assets/mastercard.png',\n            height: 48,\n            width: 48,\n          ),\n        ),\n      ],\n    ),\n``` \n\n*Glassmorphism UI*\n\n + Default configuration\n```dart\n    CreditCardWidget(\n      glassmorphismConfig: Glassmorphism.defaultConfig(),\n    );\n```    \n\n + Custom configuration\n```dart\n    CreditCardWidget(\n      glassmorphismConfig: Glassmorphism(\n        blurX: 10.0,\n        blurY: 10.0,\n        gradient: LinearGradient(\n          begin: Alignment.topLeft,\n          end: Alignment.bottomRight,\n          colors: \u003cColor\u003e[\n            Colors.grey.withAlpha(20),\n            Colors.white.withAlpha(20),\n          ],\n          stops: const \u003cdouble\u003e[\n            0.3,\n            0,\n          ],\n        ),\n      ),\n    ),\n```    \n\n*Floating Card*\n\n+ Default Configuration\n```dart\n    CreditCardWidget(\n        enableFloatingCard: true,\n    );\n```    \n\n+ Custom Configuration\n```dart\n    CreditCardWidget(\n        enableFloatingCard: true,\n        floatingConfig: FloatingConfig(\n            isGlareEnabled: true,\n            isShadowEnabled: true,\n            shadowConfig: FloatingShadowConfig(\n              offset: Offset(10, 10),\n              color: Colors.black84,\n              blurRadius: 15,\n            ),\n        ),\n    );\n```    \n\u003e NOTE: Currently the floating card animation is not supported on mobile platform browsers.\n\n4.  Adding CreditCardForm\n\n```dart\n    CreditCardForm(\n      formKey: formKey, // Required \n      cardNumber: cardNumber, // Required\n      expiryDate: expiryDate, // Required\n      cardHolderName: cardHolderName, // Required\n      cvvCode: cvvCode, // Required\n      cardNumberKey: cardNumberKey,\n      cvvCodeKey: cvvCodeKey,\n      expiryDateKey: expiryDateKey,\n      cardHolderKey: cardHolderKey,\n      onCreditCardModelChange: (CreditCardModel data) {}, // Required\n      obscureCvv: true, \n      obscureNumber: true,\n      isHolderNameVisible: true,\n      isCardNumberVisible: true,\n      isExpiryDateVisible: true,\n      enableCvv: true,\n      cvvValidationMessage: 'Please input a valid CVV',\n      dateValidationMessage: 'Please input a valid date',\n      numberValidationMessage: 'Please input a valid number',\n      cardNumberValidator: (String? cardNumber){},\n      expiryDateValidator: (String? expiryDate){},\n      cvvValidator: (String? cvv){},\n      cardHolderValidator: (String? cardHolderName){},\n      onFormComplete: () {\n      // callback to execute at the end of filling card data\n      },\n      autovalidateMode: AutovalidateMode.always,\n      disableCardNumberAutoFillHints: false,\n      inputConfiguration: const InputConfiguration(\n        cardNumberDecoration: InputDecoration(\n          border: OutlineInputBorder(),\n          labelText: 'Number',\n          hintText: 'XXXX XXXX XXXX XXXX',\n        ),\n        expiryDateDecoration: InputDecoration(\n          border: OutlineInputBorder(),\n          labelText: 'Expired Date',\n          hintText: 'XX/XX',\n        ),\n        cvvCodeDecoration: InputDecoration(\n          border: OutlineInputBorder(),\n          labelText: 'CVV',\n          hintText: 'XXX',\n        ),\n        cardHolderDecoration: InputDecoration(\n          border: OutlineInputBorder(),\n          labelText: 'Card Holder',\n        ),\n        cardNumberTextStyle: TextStyle(\n          fontSize: 10,\n          color: Colors.black,\n        ),\n        cardHolderTextStyle: TextStyle(\n          fontSize: 10,\n          color: Colors.black,\n        ),\n        expiryDateTextStyle: TextStyle(\n          fontSize: 10,\n          color: Colors.black,\n        ),\n        cvvCodeTextStyle: TextStyle(\n          fontSize: 10,\n          color: Colors.black,\n        ),\n      ),\n    ),\n```\n\n## How to use\nCheck out the **example** app in the [example](example) directory or the 'Example' tab on pub.dartlang.org for a more complete example.\n\n## Credit\n\n- This package's flip animation is inspired from this [Dribbble](https://dribbble.com/shots/2187649-Credit-card-Checkout-flow-AMEX) art.\n- This package's float animation is inspired from the [Motion](https://pub.dev/packages/motion) flutter package.\n\n## Main Contributors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/vatsaltanna\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/25323183?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVatsal Tanna\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/DevarshRanpara\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/26064415?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDevarsh Ranpara\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Kashifalaliwala\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/30998350?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKashifa Laliwala\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/SanketKachhela\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/20923896?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSanket Kachchela\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/meetjanani\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/32095359?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMeet Janani\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/shwetachauhan-simform\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/63042002?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eShweta Chauhan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/kavantrivedi\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/97207242?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKavan Trivedi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Ujas-Majithiya\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/56400956?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eUjas Majithiya\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/aditya-chavda\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/41247722?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAditya Chavda\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003cbr/\u003e\n\n## Awesome Mobile Libraries\n- Check out our other available [awesome mobile libraries](https://github.com/SimformSolutionsPvtLtd/Awesome-Mobile-Libraries)\n\n## Note\nWe have updated license of flutter_credit_card from BSD 2-Clause \"Simplified\" to MIT.\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2021 Simform Solutions\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSimformSolutionsPvtLtd%2Fflutter_credit_card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSimformSolutionsPvtLtd%2Fflutter_credit_card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSimformSolutionsPvtLtd%2Fflutter_credit_card/lists"}