[skip ci] fix issues from code review

This commit is contained in:
Godwin Asuquo 2022-12-13 18:26:25 +01:00
parent 0d889416d4
commit dbf214ee1b
3 changed files with 8 additions and 9 deletions

View file

@ -37,7 +37,7 @@ class IoniaGiftCard {
purchaseAmount: element['PurchaseAmount'] as double,
actualAmount: element['ActualAmount'] as double,
totalTransactionAmount: element['TotalTransactionAmount'] as double,
totalDashTransactionAmount: element['TotalDashTransactionAmount'] != null ? element['TotalDashTransactionAmount'] as double : 0.0,
totalDashTransactionAmount: (element['TotalDashTransactionAmount'] as double?) ?? 0.0,
remainingAmount: element['RemainingAmount'] as double,
isActive: element['IsActive'] as bool,
isEmpty: element['IsEmpty'] as bool,

View file

@ -31,15 +31,14 @@ class IoniaMoreOptionsPage extends BasePage {
height: 10,
),
Center(
child: Text(
S.of(context).choose_from_available_options,
style: textMedium(
color: Theme.of(context).primaryTextTheme.headline6!.color!,
child: Text(
S.of(context).choose_from_available_options,
style: textMedium(
color: Theme.of(context).primaryTextTheme.headline6!.color!,
),
),
)),
SizedBox(
height: 40,
),
SizedBox(height: 40),
InkWell(
onTap: () async {
final amount = await Navigator.of(context)

View file

@ -35,7 +35,7 @@ abstract class IoniaCustomRedeemViewModelBase with Store {
@action
void updateAmount(String text) {
amount = text.isEmpty ? 0 : (double.parse(text.replaceAll(',', '.')));
amount = double.tryParse(text.replaceAll(',', '.')) ?? 0;
}
@action