@@ -23,6 +23,7 @@ class CreditCardWidget extends StatefulWidget {
23
23
required this .cardHolderName,
24
24
required this .cvvCode,
25
25
required this .showBackView,
26
+ this .bankName,
26
27
this .animationDuration = const Duration (milliseconds: 500 ),
27
28
this .height,
28
29
this .width,
@@ -35,6 +36,7 @@ class CreditCardWidget extends StatefulWidget {
35
36
this .cardType,
36
37
this .isHolderNameVisible = false ,
37
38
this .backgroundImage,
39
+ this .backgroundNetworkImage,
38
40
this .glassmorphismConfig,
39
41
this .isChipVisible = true ,
40
42
this .isSwipeGestureEnabled = true ,
@@ -49,6 +51,7 @@ class CreditCardWidget extends StatefulWidget {
49
51
final TextStyle ? textStyle;
50
52
final Color cardBgColor;
51
53
final bool showBackView;
54
+ final String ? bankName;
52
55
final Duration animationDuration;
53
56
final double ? height;
54
57
final double ? width;
@@ -57,6 +60,7 @@ class CreditCardWidget extends StatefulWidget {
57
60
final void Function (CreditCardBrand ) onCreditCardWidgetChange;
58
61
final bool isHolderNameVisible;
59
62
final String ? backgroundImage;
63
+ final String ? backgroundNetworkImage;
60
64
final bool isChipVisible;
61
65
final Glassmorphism ? glassmorphismConfig;
62
66
final bool isSwipeGestureEnabled;
@@ -251,15 +255,26 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
251
255
}
252
256
return CardBackground (
253
257
backgroundImage: widget.backgroundImage,
258
+ backgroundNetworkImage: widget.backgroundNetworkImage,
254
259
backgroundGradientColor: backgroundGradientColor,
255
260
glassmorphismConfig: widget.glassmorphismConfig,
256
261
height: widget.height,
257
262
width: widget.width,
258
263
child: Column (
259
264
crossAxisAlignment: CrossAxisAlignment .start,
260
265
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
+ ),
261
276
Expanded (
262
- flex: widget.isChipVisible ? 2 : 0 ,
277
+ flex: widget.isChipVisible ? 1 : 0 ,
263
278
child: Row (
264
279
crossAxisAlignment: CrossAxisAlignment .end,
265
280
children: < Widget > [
@@ -363,6 +378,7 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
363
378
364
379
return CardBackground (
365
380
backgroundImage: widget.backgroundImage,
381
+ backgroundNetworkImage: widget.backgroundNetworkImage,
366
382
backgroundGradientColor: backgroundGradientColor,
367
383
glassmorphismConfig: widget.glassmorphismConfig,
368
384
height: widget.height,
0 commit comments