diff --git a/CHANGELOG.md b/CHANGELOG.md
index 15cafb4..2cae40e 100644
--- a/CHANGELOG.md
+++ b/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
diff --git a/README.md b/README.md
index 3bf56ee..71d7b32 100644
--- a/README.md
+++ b/README.md
@@ -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(),
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 9367d48..8d4492f 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 8.0
+ 9.0
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 3c8267a..fcecef0 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@@ -136,7 +136,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0910;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -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";
@@ -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;
@@ -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";
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 786d6aa..f156018 100644
--- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
UIViewControllerBasedStatusBarAppearance
+ CADisableMinimumFrameDurationOnPhone
+
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 3cc00dc..4e4d618 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -66,6 +66,7 @@ class MySampleState extends State {
expiryDate: expiryDate,
cardHolderName: cardHolderName,
cvvCode: cvvCode,
+ bankName: 'Axis Bank',
showBackView: isCvvFocused,
obscureCardNumber: true,
obscureCardCvv: true,
diff --git a/lib/credit_card_widget.dart b/lib/credit_card_widget.dart
index 108ea61..0cd7372 100644
--- a/lib/credit_card_widget.dart
+++ b/lib/credit_card_widget.dart
@@ -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,
@@ -35,6 +36,7 @@ class CreditCardWidget extends StatefulWidget {
this.cardType,
this.isHolderNameVisible = false,
this.backgroundImage,
+ this.backgroundNetworkImage,
this.glassmorphismConfig,
this.isChipVisible = true,
this.isSwipeGestureEnabled = true,
@@ -49,6 +51,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;
@@ -57,6 +60,7 @@ class CreditCardWidget extends StatefulWidget {
final void Function(CreditCardBrand) onCreditCardWidgetChange;
final bool isHolderNameVisible;
final String? backgroundImage;
+ final String? backgroundNetworkImage;
final bool isChipVisible;
final Glassmorphism? glassmorphismConfig;
final bool isSwipeGestureEnabled;
@@ -251,6 +255,7 @@ class _CreditCardWidgetState extends State
}
return CardBackground(
backgroundImage: widget.backgroundImage,
+ backgroundNetworkImage: widget.backgroundNetworkImage,
backgroundGradientColor: backgroundGradientColor,
glassmorphismConfig: widget.glassmorphismConfig,
height: widget.height,
@@ -258,8 +263,18 @@ class _CreditCardWidgetState extends State
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
+ 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: [
@@ -363,6 +378,7 @@ class _CreditCardWidgetState extends State
return CardBackground(
backgroundImage: widget.backgroundImage,
+ backgroundNetworkImage: widget.backgroundNetworkImage,
backgroundGradientColor: backgroundGradientColor,
glassmorphismConfig: widget.glassmorphismConfig,
height: widget.height,
diff --git a/pubspec.yaml b/pubspec.yaml
index 8ec15b9..df8cc6b 100644
--- a/pubspec.yaml
+++ b/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