[skip ci] fix issues from code review
Godwin Asuquo committed
Dec 13, 2022 at 18:26 UTC
dbf214ee1bd7fc32f744eee24f142d5eb1598ea6
3 files changed
+8
-9
lib/ionia/ionia_gift_card.dart
+1
-1
@@ -37,7 +37,7 @@ class IoniaGiftCard {
37
purchaseAmount: element['PurchaseAmount'] as double,
38
actualAmount: element['ActualAmount'] as double,
39
totalTransactionAmount: element['TotalTransactionAmount'] as double,
40
- totalDashTransactionAmount: element['TotalDashTransactionAmount'] != null ? element['TotalDashTransactionAmount'] as double : 0.0,
40
+ totalDashTransactionAmount: (element['TotalDashTransactionAmount'] as double?) ?? 0.0,
41
remainingAmount: element['RemainingAmount'] as double,
42
isActive: element['IsActive'] as bool,
43
isEmpty: element['IsEmpty'] as bool,
lib/src/screens/ionia/cards/ionia_more_options_page.dart
+6
-7
@@ -31,15 +31,14 @@ class IoniaMoreOptionsPage extends BasePage {
31
height: 10,
32
),
33
Center(
34
- child: Text(
35
- S.of(context).choose_from_available_options,
36
- style: textMedium(
37
- color: Theme.of(context).primaryTextTheme.headline6!.color!,
34
+ child: Text(
35
+ S.of(context).choose_from_available_options,
36
+ style: textMedium(
37
+ color: Theme.of(context).primaryTextTheme.headline6!.color!,
38
+ ),
39
),
39
- )),
40
- SizedBox(
41
- height: 40,
40
),
41
+ SizedBox(height: 40),
42
InkWell(
43
onTap: () async {
44
final amount = await Navigator.of(context)
lib/view_model/ionia/ionia_custom_redeem_view_model.dart
+1
-1
@@ -35,7 +35,7 @@ abstract class IoniaCustomRedeemViewModelBase with Store {
35
36
@action
37
void updateAmount(String text) {
38
- amount = text.isEmpty ? 0 : (double.parse(text.replaceAll(',', '.')));
38
+ amount = double.tryParse(text.replaceAll(',', '.')) ?? 0;
39
}
40
41
@action