Skip to content

Commit 7d1b4fe

Browse files
DhavalRKansaraDevarshRanpara
authored andcommitted
Fixes #47 Added bank name above card number
1 parent 9ca9eee commit 7d1b4fe

File tree

9 files changed

+34
-9
lines changed

9 files changed

+34
-9
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.0.3 - Aug 10, 2022
2+
3+
- Fixed [#47](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/47) - Added Bank name above card number
4+
- Fixed [#6](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/6) - Initialize values
5+
16
## 3.0.2 - Jul 25, 2022
27

38
- Fixed [#73](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/73) - Pass AutovalidateMode to CreditCardForm

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import 'package:flutter_credit_card/flutter_credit_card.dart';
4646
expiryDate: expiryDate,
4747
cardHolderName: cardHolderName,
4848
cvvCode: cvvCode,
49+
bankName: 'Axis Bank',
4950
showBackView: isCvvFocused,
5051
cardBgColor: Colors.black,
5152
glassmorphismConfig: Glassmorphism.defaultConfig(),

example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>9.0</string>
2525
</dict>
2626
</plist>

example/ios/Runner.xcodeproj/project.pbxproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 50;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -136,7 +136,7 @@
136136
97C146E61CF9000F007C117D /* Project object */ = {
137137
isa = PBXProject;
138138
attributes = {
139-
LastUpgradeCheck = 0910;
139+
LastUpgradeCheck = 1300;
140140
ORGANIZATIONNAME = "The Chromium Authors";
141141
TargetAttributes = {
142142
97C146ED1CF9000F007C117D = {
@@ -280,7 +280,7 @@
280280
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
281281
GCC_WARN_UNUSED_FUNCTION = YES;
282282
GCC_WARN_UNUSED_VARIABLE = YES;
283-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
283+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
284284
MTL_ENABLE_DEBUG_INFO = NO;
285285
SDKROOT = iphoneos;
286286
TARGETED_DEVICE_FAMILY = "1,2";
@@ -358,7 +358,7 @@
358358
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
359359
GCC_WARN_UNUSED_FUNCTION = YES;
360360
GCC_WARN_UNUSED_VARIABLE = YES;
361-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
361+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
362362
MTL_ENABLE_DEBUG_INFO = YES;
363363
ONLY_ACTIVE_ARCH = YES;
364364
SDKROOT = iphoneos;
@@ -405,7 +405,7 @@
405405
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
406406
GCC_WARN_UNUSED_FUNCTION = YES;
407407
GCC_WARN_UNUSED_VARIABLE = YES;
408-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
408+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
409409
MTL_ENABLE_DEBUG_INFO = NO;
410410
SDKROOT = iphoneos;
411411
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0910"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/ios/Runner/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
4446
</dict>
4547
</plist>

example/lib/main.dart

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class MySampleState extends State<MySample> {
6666
expiryDate: expiryDate,
6767
cardHolderName: cardHolderName,
6868
cvvCode: cvvCode,
69+
bankName: 'Axis Bank',
6970
showBackView: isCvvFocused,
7071
obscureCardNumber: true,
7172
obscureCardCvv: true,

lib/credit_card_widget.dart

+17-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class CreditCardWidget extends StatefulWidget {
2323
required this.cardHolderName,
2424
required this.cvvCode,
2525
required this.showBackView,
26+
this.bankName,
2627
this.animationDuration = const Duration(milliseconds: 500),
2728
this.height,
2829
this.width,
@@ -35,6 +36,7 @@ class CreditCardWidget extends StatefulWidget {
3536
this.cardType,
3637
this.isHolderNameVisible = false,
3738
this.backgroundImage,
39+
this.backgroundNetworkImage,
3840
this.glassmorphismConfig,
3941
this.isChipVisible = true,
4042
this.isSwipeGestureEnabled = true,
@@ -49,6 +51,7 @@ class CreditCardWidget extends StatefulWidget {
4951
final TextStyle? textStyle;
5052
final Color cardBgColor;
5153
final bool showBackView;
54+
final String? bankName;
5255
final Duration animationDuration;
5356
final double? height;
5457
final double? width;
@@ -57,6 +60,7 @@ class CreditCardWidget extends StatefulWidget {
5760
final void Function(CreditCardBrand) onCreditCardWidgetChange;
5861
final bool isHolderNameVisible;
5962
final String? backgroundImage;
63+
final String? backgroundNetworkImage;
6064
final bool isChipVisible;
6165
final Glassmorphism? glassmorphismConfig;
6266
final bool isSwipeGestureEnabled;
@@ -251,15 +255,26 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
251255
}
252256
return CardBackground(
253257
backgroundImage: widget.backgroundImage,
258+
backgroundNetworkImage: widget.backgroundNetworkImage,
254259
backgroundGradientColor: backgroundGradientColor,
255260
glassmorphismConfig: widget.glassmorphismConfig,
256261
height: widget.height,
257262
width: widget.width,
258263
child: Column(
259264
crossAxisAlignment: CrossAxisAlignment.start,
260265
children: <Widget>[
266+
if (widget.bankName != null && widget.bankName!.isNotEmpty)
267+
Padding(
268+
padding: const EdgeInsets.only(left: 16, top: 16),
269+
child: Text(
270+
widget.bankName!,
271+
maxLines: 1,
272+
overflow: TextOverflow.ellipsis,
273+
style: defaultTextStyle,
274+
),
275+
),
261276
Expanded(
262-
flex: widget.isChipVisible ? 2 : 0,
277+
flex: widget.isChipVisible ? 1 : 0,
263278
child: Row(
264279
crossAxisAlignment: CrossAxisAlignment.end,
265280
children: <Widget>[
@@ -363,6 +378,7 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
363378

364379
return CardBackground(
365380
backgroundImage: widget.backgroundImage,
381+
backgroundNetworkImage: widget.backgroundNetworkImage,
366382
backgroundGradientColor: backgroundGradientColor,
367383
glassmorphismConfig: widget.glassmorphismConfig,
368384
height: widget.height,

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_credit_card
22
description: A Credit Card widget package, support entering card details, card flip animation.
3-
version: 3.0.2
3+
version: 3.0.3
44
homepage: https://github.com/simformsolutions/flutter_credit_card
55
issue_tracker: https://github.com/simformsolutions/flutter_credit_card/issues
66

0 commit comments

Comments
 (0)