Skip to content

Commit

Permalink
Fixes #47 Added bank name above card number
Browse files Browse the repository at this point in the history
  • Loading branch information
DhavalRKansara committed Aug 9, 2022
1 parent 65094b5 commit 10ca8de
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 3.0.3 - Aug 9, 2022(UnReleased)

- Fixed [#47](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/47) - Added Bank name above card number

## 3.0.2 - Jul 25, 2022

- Fixed [#73](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/73) - Pass AutovalidateMode to CreditCardForm
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -46,6 +46,7 @@ import 'package:flutter_credit_card/flutter_credit_card.dart';
expiryDate: expiryDate,
cardHolderName: cardHolderName,
cvvCode: cvvCode,
bankName: 'Axis Bank',
showBackView: isCvvFocused,
cardBgColor: Colors.black,
glassmorphismConfig: Glassmorphism.defaultConfig(),
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
10 changes: 5 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -136,7 +136,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -280,7 +280,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -358,7 +358,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -405,7 +405,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Expand Up @@ -41,5 +41,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
1 change: 1 addition & 0 deletions example/lib/main.dart
Expand Up @@ -66,6 +66,7 @@ class MySampleState extends State<MySample> {
expiryDate: expiryDate,
cardHolderName: cardHolderName,
cvvCode: cvvCode,
bankName: 'Axis Bank',
showBackView: isCvvFocused,
obscureCardNumber: true,
obscureCardCvv: true,
Expand Down
14 changes: 13 additions & 1 deletion lib/credit_card_widget.dart
Expand Up @@ -23,6 +23,7 @@ class CreditCardWidget extends StatefulWidget {
required this.cardHolderName,
required this.cvvCode,
required this.showBackView,
this.bankName,
this.animationDuration = const Duration(milliseconds: 500),
this.height,
this.width,
Expand All @@ -49,6 +50,7 @@ class CreditCardWidget extends StatefulWidget {
final TextStyle? textStyle;
final Color cardBgColor;
final bool showBackView;
final String? bankName;
final Duration animationDuration;
final double? height;
final double? width;
Expand Down Expand Up @@ -258,8 +260,18 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (widget.bankName != null && widget.bankName!.isNotEmpty)
Padding(
padding: const EdgeInsets.only(left: 16, top: 16),
child: Text(
widget.bankName!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: defaultTextStyle,
),
),
Expanded(
flex: widget.isChipVisible ? 2 : 0,
flex: widget.isChipVisible ? 1 : 0,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,6 +1,6 @@
name: flutter_credit_card
description: A Credit Card widget package, support entering card details, card flip animation.
version: 3.0.2
version: 3.0.3
homepage: https://github.com/simformsolutions/flutter_credit_card
issue_tracker: https://github.com/simformsolutions/flutter_credit_card/issues

Expand Down

0 comments on commit 10ca8de

Please sign in to comment.