mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
Add Fiat API mode to advanced privacy settings page
This commit is contained in:
@@ -52,39 +52,37 @@ class _AdvancedPrivacySettingsBodyState extends State<AdvancedPrivacySettingsBod
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Observer(
|
||||
builder: (_) {
|
||||
return SettingsSwitcherCell(
|
||||
Observer(builder: (_) {
|
||||
return SettingsChoicesCell(
|
||||
ChoicesListItem<FiatApiMode>(
|
||||
title: S.current.disable_fiat,
|
||||
value: widget.privacySettingsViewModel.fiatApi == FiatApiMode.disabled,
|
||||
onValueChange: (BuildContext context, bool value) {
|
||||
widget.privacySettingsViewModel.setFiatMode(value);
|
||||
});
|
||||
}
|
||||
),
|
||||
Observer(
|
||||
builder: (_) {
|
||||
return SettingsChoicesCell(
|
||||
ChoicesListItem<ExchangeApiMode>(
|
||||
title: S.current.exchange,
|
||||
items: ExchangeApiMode.all,
|
||||
selectedItem: widget.privacySettingsViewModel.exchangeStatus,
|
||||
onItemSelected: (ExchangeApiMode mode) =>
|
||||
widget.privacySettingsViewModel.setExchangeApiMode(mode),
|
||||
items: FiatApiMode.all,
|
||||
selectedItem: widget.privacySettingsViewModel.fiatApiMode,
|
||||
onItemSelected: (FiatApiMode mode) =>
|
||||
widget.privacySettingsViewModel.setFiatApiMode(mode),
|
||||
),
|
||||
);
|
||||
}),
|
||||
Observer(builder: (_) {
|
||||
return SettingsChoicesCell(
|
||||
ChoicesListItem<ExchangeApiMode>(
|
||||
title: S.current.exchange,
|
||||
items: ExchangeApiMode.all,
|
||||
selectedItem: widget.privacySettingsViewModel.exchangeStatus,
|
||||
onItemSelected: (ExchangeApiMode mode) =>
|
||||
widget.privacySettingsViewModel.setExchangeApiMode(mode),
|
||||
),
|
||||
);
|
||||
}),
|
||||
Observer(builder: (_) {
|
||||
return Column(
|
||||
children: [
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.add_custom_node,
|
||||
value: widget.privacySettingsViewModel.addCustomNode,
|
||||
onValueChange: (_, __) => widget.privacySettingsViewModel.toggleAddCustomNode(),
|
||||
),
|
||||
);
|
||||
}
|
||||
),
|
||||
Observer(
|
||||
builder: (_) {
|
||||
return Column(
|
||||
children: [
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.add_custom_node,
|
||||
value: widget.privacySettingsViewModel.addCustomNode,
|
||||
onValueChange: (_, __) => widget.privacySettingsViewModel.toggleAddCustomNode(),
|
||||
),
|
||||
if (widget.privacySettingsViewModel.addCustomNode)
|
||||
if (widget.privacySettingsViewModel.addCustomNode)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 24, right: 24, top: 24),
|
||||
child: NodeForm(
|
||||
@@ -92,11 +90,9 @@ class _AdvancedPrivacySettingsBodyState extends State<AdvancedPrivacySettingsBod
|
||||
nodeViewModel: widget.nodeViewModel,
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
bottomSectionPadding: EdgeInsets.all(24),
|
||||
|
||||
Reference in New Issue
Block a user