mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Checkbox for fixed mode on exchange screen
This commit is contained in:
parent
e326507b4d
commit
4923de4511
1 changed files with 21 additions and 0 deletions
|
@ -317,6 +317,21 @@ class ExchangePage extends BasePage {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 12, left: 24),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
StandardCheckbox(
|
||||||
|
key: checkBoxKey,
|
||||||
|
value: exchangeViewModel.isFixedRateMode,
|
||||||
|
caption: S.of(context).fixed_rate,
|
||||||
|
onChanged: (value) =>
|
||||||
|
exchangeViewModel.isFixedRateMode = value,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
SizedBox(height: 30),
|
SizedBox(height: 30),
|
||||||
_buildTemplateSection(context)
|
_buildTemplateSection(context)
|
||||||
],
|
],
|
||||||
|
@ -655,6 +670,12 @@ class ExchangePage extends BasePage {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
reaction((_) => exchangeViewModel.isFixedRateMode, (bool value) {
|
||||||
|
if (checkBoxKey.currentState.value != exchangeViewModel.isFixedRateMode) {
|
||||||
|
checkBoxKey.currentState.value = exchangeViewModel.isFixedRateMode;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
depositAddressController.addListener(
|
depositAddressController.addListener(
|
||||||
() => exchangeViewModel.depositAddress = depositAddressController.text);
|
() => exchangeViewModel.depositAddress = depositAddressController.text);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue