mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-08 20:09:24 +00:00
CW-148 cake pay partial redemptions (#490)
* Ionia custom redemption screen * update ionia gift card remaining amount with custom value * [NO-TASK] Fix issues with custom redeem * replace redeem * update remaining amount * fixed from code review * Add localization
This commit is contained in:
parent
0aee6e1b8d
commit
bd25d047b2
26 changed files with 446 additions and 32 deletions
18
lib/di.dart
18
lib/di.dart
|
@ -5,10 +5,13 @@ import 'package:cake_wallet/ionia/ionia_anypay.dart';
|
|||
import 'package:cake_wallet/ionia/ionia_category.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_custom_redeem_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_gift_card_detail_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_more_options_page.dart';
|
||||
import 'package:cake_wallet/view_model/ionia/ionia_auth_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/ionia/ionia_buy_card_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/ionia/ionia_custom_tip_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/ionia/ionia_custom_redeem_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/ionia/ionia_filter_view_model.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_service.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_api.dart';
|
||||
|
@ -747,6 +750,21 @@ Future setup(
|
|||
return IoniaGiftCardDetailPage(getIt.get<IoniaGiftCardDetailsViewModel>(param1: giftCard));
|
||||
});
|
||||
|
||||
getIt.registerFactoryParam<IoniaMoreOptionsPage, List, void>((List args, _){
|
||||
final giftCard = args.first as IoniaGiftCard;
|
||||
|
||||
return IoniaMoreOptionsPage(giftCard);
|
||||
});
|
||||
|
||||
getIt.registerFactoryParam<IoniaCustomRedeemViewModel, IoniaGiftCard, void>((IoniaGiftCard giftCard, _) => IoniaCustomRedeemViewModel(giftCard));
|
||||
|
||||
getIt.registerFactoryParam<IoniaCustomRedeemPage, List, void>((List args, _){
|
||||
final giftCard = args.first as IoniaGiftCard;
|
||||
|
||||
return IoniaCustomRedeemPage(getIt.get<IoniaCustomRedeemViewModel>(param1: giftCard) );
|
||||
});
|
||||
|
||||
|
||||
getIt.registerFactoryParam<IoniaCustomTipPage, List, void>((List args, _) {
|
||||
return IoniaCustomTipPage(getIt.get<IoniaCustomTipViewModel>(param1: args));
|
||||
});
|
||||
|
|
|
@ -60,10 +60,11 @@ class IoniaGiftCard {
|
|||
final double actualAmount;
|
||||
final double totalTransactionAmount;
|
||||
final double totalDashTransactionAmount;
|
||||
final double remainingAmount;
|
||||
double remainingAmount;
|
||||
final String createdDateFormatted;
|
||||
final String lastTransactionDateFormatted;
|
||||
final bool isActive;
|
||||
final bool isEmpty;
|
||||
final String logoUrl;
|
||||
|
||||
}
|
|
@ -6,8 +6,10 @@ import 'package:cake_wallet/src/screens/buy/buy_webview_page.dart';
|
|||
import 'package:cake_wallet/src/screens/buy/pre_order_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_account_cards_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_account_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_custom_redeem_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_custom_tip_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_gift_card_detail_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/cards/ionia_more_options_page.dart';
|
||||
import 'package:cake_wallet/src/screens/order_details/order_details_page.dart';
|
||||
import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart';
|
||||
import 'package:cake_wallet/src/screens/restore/restore_from_backup_page.dart';
|
||||
|
@ -452,6 +454,14 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
|||
case Routes.ioniaGiftCardDetailPage:
|
||||
final args = settings.arguments as List;
|
||||
return CupertinoPageRoute<void>(builder: (_) => getIt.get<IoniaGiftCardDetailPage>(param1: args.first));
|
||||
|
||||
case Routes.ioniaCustomRedeemPage:
|
||||
final args = settings.arguments as List;
|
||||
return CupertinoPageRoute<void>(builder: (_) => getIt.get<IoniaCustomRedeemPage>(param1: args));
|
||||
|
||||
case Routes.ioniaMoreOptionsPage:
|
||||
final args = settings.arguments as List;
|
||||
return CupertinoPageRoute<void>(builder: (_) => getIt.get<IoniaMoreOptionsPage>(param1: args));
|
||||
|
||||
case Routes.ioniaPaymentStatusPage:
|
||||
final args = settings.arguments as List;
|
||||
|
|
|
@ -74,4 +74,6 @@ class Routes {
|
|||
static const ioniaCustomTipPage = 'ionia_custom_tip_page';
|
||||
static const ioniaGiftCardDetailPage = '/ionia_gift_card_detail_page';
|
||||
static const ioniaPaymentStatusPage = '/ionia_payment_status_page';
|
||||
static const ioniaMoreOptionsPage = '/ionia_more_options_page';
|
||||
static const ioniaCustomRedeemPage = '/ionia_custom_redeem_page';
|
||||
}
|
||||
|
|
167
lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart
Normal file
167
lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart
Normal file
|
@ -0,0 +1,167 @@
|
|||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart';
|
||||
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
|
||||
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
|
||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:cake_wallet/view_model/ionia/ionia_custom_redeem_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:keyboard_actions/keyboard_actions.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
|
||||
class IoniaCustomRedeemPage extends BasePage {
|
||||
IoniaCustomRedeemPage(
|
||||
this.ioniaCustomRedeemViewModel,
|
||||
) : _amountFieldFocus = FocusNode(),
|
||||
_amountController = TextEditingController() {
|
||||
_amountController.addListener(() {
|
||||
ioniaCustomRedeemViewModel.updateAmount(_amountController.text);
|
||||
});
|
||||
}
|
||||
|
||||
final IoniaCustomRedeemViewModel ioniaCustomRedeemViewModel;
|
||||
|
||||
|
||||
@override
|
||||
String get title => S.current.custom_redeem_amount;
|
||||
|
||||
@override
|
||||
Color get titleColor => Colors.white;
|
||||
|
||||
@override
|
||||
bool get extendBodyBehindAppBar => true;
|
||||
|
||||
@override
|
||||
AppBarStyle get appBarStyle => AppBarStyle.transparent;
|
||||
|
||||
Color get textColor => currentTheme.type == ThemeType.dark ? Colors.white : Color(0xff393939);
|
||||
|
||||
final TextEditingController _amountController;
|
||||
final FocusNode _amountFieldFocus;
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
final _width = MediaQuery.of(context).size.width;
|
||||
final giftCard = ioniaCustomRedeemViewModel.giftCard;
|
||||
return KeyboardActions(
|
||||
disableScroll: true,
|
||||
config: KeyboardActionsConfig(
|
||||
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
|
||||
keyboardBarColor: Theme.of(context).accentTextTheme.body2.backgroundColor,
|
||||
nextFocus: false,
|
||||
actions: [
|
||||
KeyboardActionsItem(
|
||||
focusNode: _amountFieldFocus,
|
||||
toolbarButtons: [(_) => KeyboardDoneButton()],
|
||||
),
|
||||
]),
|
||||
child: Container(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
child: ScrollableWithBottomSection(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
content: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 25),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)),
|
||||
gradient: LinearGradient(colors: [
|
||||
Theme.of(context).primaryTextTheme.subhead.color,
|
||||
Theme.of(context).primaryTextTheme.subhead.decorationColor,
|
||||
], begin: Alignment.topLeft, end: Alignment.bottomRight),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
SizedBox(height: 150),
|
||||
BaseTextFormField(
|
||||
controller: _amountController,
|
||||
focusNode: _amountFieldFocus,
|
||||
keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true),
|
||||
inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\-|\ ]'))],
|
||||
hintText: '1000',
|
||||
placeholderTextStyle: TextStyle(
|
||||
color: Theme.of(context).primaryTextTheme.headline.color,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 36,
|
||||
),
|
||||
borderColor: Theme.of(context).primaryTextTheme.headline.color,
|
||||
textColor: Colors.white,
|
||||
textStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 36,
|
||||
),
|
||||
suffixIcon: SizedBox(
|
||||
width: _width / 6,
|
||||
),
|
||||
prefixIcon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 5.0,
|
||||
left: _width / 4,
|
||||
),
|
||||
child: Text(
|
||||
'USD: ',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w900,
|
||||
fontSize: 36,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Observer(builder: (_)=>
|
||||
!ioniaCustomRedeemViewModel.disableRedeem ?
|
||||
Center(
|
||||
child: Text('\$${giftCard.remainingAmount} - \$${ioniaCustomRedeemViewModel.amount} = \$${ioniaCustomRedeemViewModel.remaining} ${S.of(context).remaining}',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryTextTheme.headline.color,
|
||||
),),
|
||||
) : SizedBox.shrink(),
|
||||
),
|
||||
SizedBox(height: 24),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: CardItem(
|
||||
title: giftCard.legalName,
|
||||
backgroundColor: Theme.of(context).accentTextTheme.display4.backgroundColor.withOpacity(0.1),
|
||||
discount: giftCard.remainingAmount,
|
||||
isAmount: true,
|
||||
discountBackground: AssetImage('assets/images/red_badge_discount.png'),
|
||||
titleColor: Theme.of(context).accentTextTheme.display4.backgroundColor,
|
||||
subtitleColor: Theme.of(context).hintColor,
|
||||
subTitle: S.of(context).online,
|
||||
logoUrl: giftCard.logoUrl,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
bottomSection: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
child: PrimaryButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(_amountController.text);
|
||||
},
|
||||
isDisabled: ioniaCustomRedeemViewModel.disableRedeem,
|
||||
text: S.of(context).add_custom_redemption,
|
||||
color: Theme.of(context).accentTextTheme.body2.color,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -117,7 +117,7 @@ class IoniaGiftCardDetailPage extends BasePage {
|
|||
buildIoniaTile(
|
||||
context,
|
||||
title: S.of(context).amount,
|
||||
subTitle: viewModel.giftCard.remainingAmount.toStringAsFixed(2) ?? '0.00',
|
||||
subTitle: viewModel.remainingAmount.toStringAsFixed(2) ?? '0.00',
|
||||
)),
|
||||
Divider(height: 50),
|
||||
TextIconButton(
|
||||
|
@ -127,21 +127,45 @@ class IoniaGiftCardDetailPage extends BasePage {
|
|||
],
|
||||
),
|
||||
bottomSection: Padding(
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
child: Observer(builder: (_) {
|
||||
if (!viewModel.giftCard.isEmpty) {
|
||||
return LoadingPrimaryButton(
|
||||
isLoading: viewModel.redeemState is IsExecutingState,
|
||||
onPressed: () => viewModel.redeem().then((_){
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(Routes.ioniaManageCardsPage, (route) => route.isFirst);
|
||||
}),
|
||||
text: S.of(context).mark_as_redeemed,
|
||||
color: Theme.of(context).accentTextTheme.body2.color,
|
||||
textColor: Colors.white);
|
||||
}
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
child: Observer(
|
||||
builder: (_) {
|
||||
if (!viewModel.giftCard.isEmpty) {
|
||||
return Column(
|
||||
children: [
|
||||
PrimaryButton(
|
||||
onPressed: () async {
|
||||
final amount = await Navigator.of(context)
|
||||
.pushNamed(Routes.ioniaMoreOptionsPage, arguments: [viewModel.giftCard]) as String;
|
||||
if (amount != null) {
|
||||
viewModel.updateRemaining(double.parse(amount));
|
||||
}
|
||||
},
|
||||
text: S.of(context).more_options,
|
||||
color: Theme.of(context).accentTextTheme.caption.color,
|
||||
textColor: Theme.of(context).primaryTextTheme.title.color,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
LoadingPrimaryButton(
|
||||
isLoading: viewModel.redeemState is IsExecutingState,
|
||||
onPressed: () => viewModel.redeem().then(
|
||||
(_) {
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil(Routes.ioniaManageCardsPage, (route) => route.isFirst);
|
||||
},
|
||||
),
|
||||
text: S.of(context).mark_as_redeemed,
|
||||
color: Theme.of(context).accentTextTheme.body2.color,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
return Container();
|
||||
})),
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
90
lib/src/screens/ionia/cards/ionia_more_options_page.dart
Normal file
90
lib/src/screens/ionia/cards/ionia_more_options_page.dart
Normal file
|
@ -0,0 +1,90 @@
|
|||
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/typography.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class IoniaMoreOptionsPage extends BasePage {
|
||||
IoniaMoreOptionsPage(this.giftCard);
|
||||
|
||||
final IoniaGiftCard giftCard;
|
||||
|
||||
@override
|
||||
Widget middle(BuildContext context) {
|
||||
return Text(
|
||||
S.current.more_options,
|
||||
style: textMediumSemiBold(
|
||||
color: Theme.of(context).accentTextTheme.display4.backgroundColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
SizedBox(height: 10,),
|
||||
Center(child: Text(S.of(context).choose_from_available_options, style: textMedium(
|
||||
color: Theme.of(context).primaryTextTheme.title.color,
|
||||
),)),
|
||||
SizedBox(height: 40,),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
final amount = await Navigator.of(context).pushNamed(Routes.ioniaCustomRedeemPage, arguments: [giftCard]) as String;
|
||||
if(amount.isNotEmpty){
|
||||
Navigator.pop(context, amount);
|
||||
}
|
||||
},
|
||||
child: _GradiantContainer(
|
||||
content: Padding(
|
||||
padding: const EdgeInsets.only(top: 24, left: 20, right: 24, bottom: 50),
|
||||
child: Text(
|
||||
S.of(context).custom_redeem_amount,
|
||||
style: textXLargeSemiBold(),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _GradiantContainer extends StatelessWidget {
|
||||
const _GradiantContainer({
|
||||
Key key,
|
||||
@required this.content,
|
||||
this.padding,
|
||||
this.width,
|
||||
}) : super(key: key);
|
||||
|
||||
final Widget content;
|
||||
final EdgeInsets padding;
|
||||
final double width;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: content,
|
||||
width: width,
|
||||
padding: padding ?? EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
Theme.of(context).accentColor,
|
||||
],
|
||||
begin: Alignment.topRight,
|
||||
end: Alignment.bottomLeft,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ class CardItem extends StatelessWidget {
|
|||
this.onTap,
|
||||
this.logoUrl,
|
||||
this.discount,
|
||||
this.isAmount = false,
|
||||
});
|
||||
|
||||
final VoidCallback onTap;
|
||||
|
@ -19,6 +20,7 @@ class CardItem extends StatelessWidget {
|
|||
final String subTitle;
|
||||
final String logoUrl;
|
||||
final double discount;
|
||||
final bool isAmount;
|
||||
final Color backgroundColor;
|
||||
final Color titleColor;
|
||||
final Color subtitleColor;
|
||||
|
@ -100,6 +102,7 @@ class CardItem extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(top: 20.0),
|
||||
child: DiscountBadge(
|
||||
percentage: discount,
|
||||
isAmount: isAmount,
|
||||
discountBackground: discountBackground,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -4,11 +4,13 @@ import 'package:cake_wallet/generated/i18n.dart';
|
|||
class DiscountBadge extends StatelessWidget {
|
||||
const DiscountBadge({
|
||||
Key key,
|
||||
this.isAmount = false,
|
||||
@required this.percentage,
|
||||
this.discountBackground,
|
||||
}) : super(key: key);
|
||||
|
||||
final double percentage;
|
||||
final bool isAmount;
|
||||
final AssetImage discountBackground;
|
||||
|
||||
@override
|
||||
|
@ -16,7 +18,7 @@ class DiscountBadge extends StatelessWidget {
|
|||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
child: Text(
|
||||
S.of(context).discount(percentage.toStringAsFixed(2)),
|
||||
isAmount ? '\$${percentage.toStringAsFixed(2)}' : S.of(context).discount(percentage.toStringAsFixed(2)),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
|
|
27
lib/view_model/ionia/ionia_custom_redeem_view_model.dart
Normal file
27
lib/view_model/ionia/ionia_custom_redeem_view_model.dart
Normal file
|
@ -0,0 +1,27 @@
|
|||
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
part 'ionia_custom_redeem_view_model.g.dart';
|
||||
class IoniaCustomRedeemViewModel = IoniaCustomRedeemViewModelBase with _$IoniaCustomRedeemViewModel;
|
||||
|
||||
abstract class IoniaCustomRedeemViewModelBase with Store {
|
||||
IoniaCustomRedeemViewModelBase(this.giftCard){
|
||||
amount = 0;
|
||||
}
|
||||
|
||||
final IoniaGiftCard giftCard;
|
||||
|
||||
@observable
|
||||
double amount;
|
||||
|
||||
@computed
|
||||
double get remaining => amount <= giftCard.remainingAmount ? giftCard.remainingAmount - amount : 0;
|
||||
|
||||
@computed
|
||||
bool get disableRedeem => amount > giftCard.remainingAmount;
|
||||
|
||||
@action
|
||||
void updateAmount(String text){
|
||||
amount = text.isEmpty ? 0 : (double.parse(text.replaceAll(',', '.')) ?? 0);
|
||||
}
|
||||
|
||||
}
|
|
@ -12,6 +12,7 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store {
|
|||
|
||||
IoniaGiftCardDetailsViewModelBase({this.ioniaService, this.giftCard}) {
|
||||
redeemState = InitialExecutionState();
|
||||
remainingAmount = giftCard.remainingAmount;
|
||||
}
|
||||
|
||||
final IoniaService ioniaService;
|
||||
|
@ -20,11 +21,15 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store {
|
|||
@observable
|
||||
IoniaGiftCard giftCard;
|
||||
|
||||
@observable
|
||||
double remainingAmount;
|
||||
|
||||
@observable
|
||||
ExecutionState redeemState;
|
||||
|
||||
@action
|
||||
Future<void> redeem() async {
|
||||
giftCard.remainingAmount = remainingAmount;
|
||||
try {
|
||||
redeemState = IsExecutingState();
|
||||
await ioniaService.redeem(giftCard);
|
||||
|
@ -35,6 +40,11 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store {
|
|||
}
|
||||
}
|
||||
|
||||
@action
|
||||
void updateRemaining(double amount){
|
||||
remainingAmount = amount;
|
||||
}
|
||||
|
||||
void increaseBrightness() async {
|
||||
brightness = await DeviceDisplayBrightness.getBrightness();
|
||||
await DeviceDisplayBrightness.setBrightness(1.0);
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Dieses feste Paar wird von den ausgewählten Vermittlungsstellen nicht unterstützt",
|
||||
"variable_pair_not_supported": "Dieses Variablenpaar wird von den ausgewählten Börsen nicht unterstützt",
|
||||
"none_of_selected_providers_can_exchange": "Keiner der ausgewählten Anbieter kann diesen Austausch vornehmen",
|
||||
"choose_one": "Wähle ein"
|
||||
"choose_one": "Wähle ein",
|
||||
"choose_from_available_options": "Wähle aus verfügbaren Optionen:",
|
||||
"custom_redeem_amount": "Benutzerdefinierter Einlösungsbetrag",
|
||||
"add_custom_redemption": "Benutzerdefinierte Einlösung hinzufügen",
|
||||
"remaining": "Rest"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "This fixed pair is not supported with the selected exchanges",
|
||||
"variable_pair_not_supported": "This variable pair is not supported with the selected exchanges",
|
||||
"none_of_selected_providers_can_exchange": "None of the selected providers can make this exchange",
|
||||
"choose_one": "Choose one"
|
||||
"choose_one": "Choose one",
|
||||
"choose_from_available_options": "Choose from the available options:",
|
||||
"custom_redeem_amount": "Custom Redeem Amount",
|
||||
"add_custom_redemption": "Add Custom Redemption",
|
||||
"remaining": "remaining"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Este par fijo no es compatible con los intercambios seleccionados",
|
||||
"variable_pair_not_supported": "Este par de variables no es compatible con los intercambios seleccionados",
|
||||
"none_of_selected_providers_can_exchange": "Ninguno de los proveedores seleccionados puede realizar este intercambio",
|
||||
"choose_one": "Elige uno"
|
||||
"choose_one": "Elige uno",
|
||||
"choose_from_available_options": "Elija entre las opciones disponibles:",
|
||||
"custom_redeem_amount": "Cantidad de canje personalizada",
|
||||
"add_custom_redemption": "Agregar redención personalizada",
|
||||
"remaining": "restante"
|
||||
}
|
||||
|
|
|
@ -637,5 +637,9 @@
|
|||
"fixed_pair_not_supported": "Cette paire fixe n'est pas prise en charge avec les échanges sélectionnés",
|
||||
"variable_pair_not_supported": "Cette paire de variables n'est pas prise en charge avec les échanges sélectionnés",
|
||||
"none_of_selected_providers_can_exchange": "Aucun des prestataires sélectionnés ne peut effectuer cet échange",
|
||||
"choose_one": "Choisissez-en un"
|
||||
"choose_one": "Choisissez-en un",
|
||||
"choose_from_available_options": "Choisissez parmi les options disponibles :",
|
||||
"custom_redeem_amount": "Montant d'échange personnalisé",
|
||||
"add_custom_redemption": "Ajouter un remboursement personnalisé",
|
||||
"remaining": "restant"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "यह निश्चित जोड़ी चयनित एक्सचेंजों के साथ समर्थित नहीं है",
|
||||
"variable_pair_not_supported": "यह परिवर्तनीय जोड़ी चयनित एक्सचेंजों के साथ समर्थित नहीं है",
|
||||
"none_of_selected_providers_can_exchange": "चयनित प्रदाताओं में से कोई भी इस एक्सचेंज को नहीं बना सकता",
|
||||
"choose_one": "एक का चयन"
|
||||
"choose_one": "एक का चयन",
|
||||
"choose_from_available_options": "उपलब्ध विकल्पों में से चुनें:",
|
||||
"custom_redeem_amount": "कस्टम रिडीम राशि",
|
||||
"add_custom_redemption": "कस्टम रिडेम्पशन जोड़ें",
|
||||
"remaining": "शेष"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Ovaj fiksni par nije podržan s odabranim burzama",
|
||||
"variable_pair_not_supported": "Ovaj par varijabli nije podržan s odabranim burzama",
|
||||
"none_of_selected_providers_can_exchange": "Niti jedan od odabranih pružatelja usluga ne može izvršiti ovu razmjenu",
|
||||
"choose_one": "Izaberi jedan"
|
||||
"choose_one": "Izaberi jedan",
|
||||
"choose_from_available_options": "Odaberite neku od dostupnih opcija:",
|
||||
"custom_redeem_amount": "Prilagođeni iznos otkupa",
|
||||
"add_custom_redemption": "Dodaj prilagođeni otkup",
|
||||
"remaining": "preostalo"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Questa coppia fissa non è supportata con gli scambi selezionati",
|
||||
"variable_pair_not_supported": "Questa coppia di variabili non è supportata con gli scambi selezionati",
|
||||
"none_of_selected_providers_can_exchange": "Nessuno dei fornitori selezionati può effettuare questo scambio",
|
||||
"choose_one": "Scegline uno"
|
||||
"choose_one": "Scegline uno",
|
||||
"choose_from_available_options": "Scegli tra le opzioni disponibili:",
|
||||
"custom_redeem_amount": "Importo di riscatto personalizzato",
|
||||
"add_custom_redemption": "Aggiungi riscatto personalizzato",
|
||||
"remaining": "rimanente"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "この固定ペアは、選択したエクスチェンジではサポートされていません",
|
||||
"variable_pair_not_supported": "この変数ペアは、選択した取引所ではサポートされていません",
|
||||
"none_of_selected_providers_can_exchange": "選択したプロバイダーはいずれもこの交換を行うことができません",
|
||||
"choose_one": "1 つ選択してください"
|
||||
"choose_one": "1 つ選択してください",
|
||||
"choose_from_available_options": "利用可能なオプションから選択してください:",
|
||||
"custom_redeem_amount": "カスタム交換金額",
|
||||
"add_custom_redemption": "カスタム引き換えを追加",
|
||||
"remaining": "残り"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "이 고정 쌍은 선택한 교환에서 지원되지 않습니다.",
|
||||
"variable_pair_not_supported": "이 변수 쌍은 선택한 교환에서 지원되지 않습니다.",
|
||||
"none_of_selected_providers_can_exchange": "선택한 공급자 중 누구도 이 교환을 할 수 없습니다.",
|
||||
"choose_one": "하나 선택"
|
||||
"choose_one": "하나 선택",
|
||||
"choose_from_available_options": "사용 가능한 옵션에서 선택:",
|
||||
"custom_redeem_amount": "사용자 지정 상환 금액",
|
||||
"add_custom_redemption": "사용자 지정 상환 추가",
|
||||
"remaining": "남은"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Dit vaste paar wordt niet ondersteund bij de geselecteerde exchanges",
|
||||
"variable_pair_not_supported": "Dit variabelenpaar wordt niet ondersteund met de geselecteerde uitwisselingen",
|
||||
"none_of_selected_providers_can_exchange": "Geen van de geselecteerde providers kan deze uitwisseling maken",
|
||||
"choose_one": "Kies er een"
|
||||
"choose_one": "Kies er een",
|
||||
"choose_from_available_options": "Kies uit de beschikbare opties:",
|
||||
"custom_redeem_amount": "Aangepast inwisselbedrag",
|
||||
"add_custom_redemption": "Voeg aangepaste inwisseling toe",
|
||||
"remaining": "resterende"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Ta stała para nie jest obsługiwana na wybranych giełdach",
|
||||
"variable_pair_not_supported": "Ta para zmiennych nie jest obsługiwana na wybranych giełdach",
|
||||
"none_of_selected_providers_can_exchange": "Żaden z wybranych dostawców nie może dokonać tej wymiany",
|
||||
"choose_one": "Wybierz jeden"
|
||||
"choose_one": "Wybierz jeden",
|
||||
"choose_from_available_options": "Wybierz z dostępnych opcji:",
|
||||
"custom_redeem_amount": "Niestandardowa kwota wykorzystania",
|
||||
"add_custom_redemption": "Dodaj niestandardowe wykorzystanie",
|
||||
"remaining": "pozostałe"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Este par fixo não é compatível com as exchanges selecionadas",
|
||||
"variable_pair_not_supported": "Este par de variáveis não é compatível com as trocas selecionadas",
|
||||
"none_of_selected_providers_can_exchange": "Nenhum dos provedores selecionados pode fazer esta troca",
|
||||
"choose_one": "Escolha um"
|
||||
"choose_one": "Escolha um",
|
||||
"choose_from_available_options": "Escolha entre as opções disponíveis:",
|
||||
"custom_redeem_amount": "Valor de resgate personalizado",
|
||||
"add_custom_redemption": "Adicionar resgate personalizado",
|
||||
"remaining": "restante"
|
||||
}
|
||||
|
|
|
@ -639,5 +639,9 @@
|
|||
"fixed_pair_not_supported": "Эта фиксированная пара не поддерживается выбранными биржами.",
|
||||
"variable_pair_not_supported": "Эта пара переменных не поддерживается выбранными биржами.",
|
||||
"none_of_selected_providers_can_exchange": "Ни один из выбранных провайдеров не может совершить этот обмен",
|
||||
"choose_one": "Выбери один"
|
||||
"choose_one": "Выбери один",
|
||||
"choose_from_available_options": "Выберите из доступных вариантов:",
|
||||
"custom_redeem_amount": "Пользовательская сумма погашения",
|
||||
"add_custom_redemption": "Добавить пользовательское погашение",
|
||||
"remaining": "осталось"
|
||||
}
|
||||
|
|
|
@ -638,5 +638,9 @@
|
|||
"fixed_pair_not_supported": "Ця фіксована пара не підтримується вибраними біржами",
|
||||
"variable_pair_not_supported": "Ця пара змінних не підтримується вибраними біржами",
|
||||
"none_of_selected_providers_can_exchange": "Жоден із вибраних провайдерів не може здійснити цей обмін",
|
||||
"choose_one": "Вибери один"
|
||||
"choose_one": "Вибери один",
|
||||
"choose_from_available_options": "Виберіть із доступних варіантів:",
|
||||
"custom_redeem_amount": "Власна сума викупу",
|
||||
"add_custom_redemption": "Додати спеціальне погашення",
|
||||
"remaining": "залишилося"
|
||||
}
|
||||
|
|
|
@ -637,5 +637,9 @@
|
|||
"fixed_pair_not_supported": "所选交易所不支持此固定货币对",
|
||||
"variable_pair_not_supported": "所选交易所不支持此变量对",
|
||||
"none_of_selected_providers_can_exchange": "选定的供应商都不能进行此交换",
|
||||
"choose_one": "选一个"
|
||||
"choose_one": "选一个",
|
||||
"choose_from_available_options": "从可用选项中选择:",
|
||||
"custom_redeem_amount": "自定义兑换金额",
|
||||
"add_custom_redemption": "添加自定义兑换",
|
||||
"remaining": "剩余"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue