File tree 2 files changed +9
-7
lines changed
lib/routes/home/widgets/payments_list/dialog
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,21 @@ class PaymentDetailsDialogContentTitle extends StatelessWidget {
13
13
@override
14
14
Widget build (BuildContext context) {
15
15
final themeData = Theme .of (context);
16
- final title = paymentInfo.dialogTitle? .replaceAll ("\n " , " " )? .trim ();
16
+ final dialogTitle = paymentInfo.dialogTitle? .replaceAll ("\n " , " " )? .trim ();
17
17
final description = paymentInfo.description? .trim ();
18
-
19
- if (title == null || title .isEmpty) {
18
+ final hasNoDescription = description == null || description.isEmpty || dialogTitle == description;
19
+ if (dialogTitle == null || dialogTitle .isEmpty) {
20
20
return Container ();
21
21
}
22
22
23
23
return Padding (
24
24
padding: EdgeInsets .only (
25
25
left: 16.0 ,
26
26
right: 16.0 ,
27
- bottom: (description == null || description.isEmpty ) ? 16 : 8 ,
27
+ bottom: (hasNoDescription ) ? 16 : 8 ,
28
28
),
29
29
child: AutoSizeText (
30
- title ,
30
+ dialogTitle ,
31
31
style: themeData.primaryTextTheme.headlineSmall,
32
32
textAlign: TextAlign .center,
33
33
overflow: TextOverflow .ellipsis,
Original file line number Diff line number Diff line change @@ -14,8 +14,10 @@ class PaymentDetailsDialogDescription extends StatelessWidget {
14
14
Widget build (BuildContext context) {
15
15
final themeData = Theme .of (context);
16
16
17
- final description = paymentInfo.description;
18
- if (description == null || description == "" ) {
17
+ final dialogTitle = paymentInfo.dialogTitle? .replaceAll ("\n " , " " )? .trim ();
18
+ final description = paymentInfo.description? .trim ();
19
+ final hasNoDescription = description == null || description.isEmpty || dialogTitle == description;
20
+ if (hasNoDescription) {
19
21
return Container ();
20
22
}
21
23
You can’t perform that action at this time.
0 commit comments