mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 18:07:44 +00:00
55b37164dc
- Add the old 'disable_fiat' translation - rename getters to be more bool like names
47 lines
1.8 KiB
Dart
47 lines
1.8 KiB
Dart
import 'package:cake_wallet/generated/i18n.dart';
|
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
|
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
|
|
import 'package:cake_wallet/view_model/settings/privacy_settings_view_model.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
|
|
|
class PrivacyPage extends BasePage {
|
|
PrivacyPage(this._privacySettingsViewModel);
|
|
|
|
@override
|
|
String get title => S.current.privacy_settings;
|
|
|
|
final PrivacySettingsViewModel _privacySettingsViewModel;
|
|
|
|
@override
|
|
Widget body(BuildContext context) {
|
|
return Container(
|
|
padding: EdgeInsets.only(top: 10),
|
|
child: Observer(builder: (_) {
|
|
return Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
SettingsSwitcherCell(
|
|
title: S.current.disable_fiat,
|
|
value: _privacySettingsViewModel.isFiatDisabled,
|
|
onValueChange: (BuildContext context, bool value) {
|
|
_privacySettingsViewModel.setFiatMode(value);
|
|
}),
|
|
SettingsSwitcherCell(
|
|
title: S.current.disable_exchange,
|
|
value: _privacySettingsViewModel.disableExchange,
|
|
onValueChange: (BuildContext context, bool value) {
|
|
_privacySettingsViewModel.setEnableExchange(value);
|
|
}),
|
|
SettingsSwitcherCell(
|
|
title: S.current.settings_save_recipient_address,
|
|
value: _privacySettingsViewModel.shouldSaveRecipientAddress,
|
|
onValueChange: (BuildContext _, bool value) {
|
|
_privacySettingsViewModel.setShouldSaveRecipientAddress(value);
|
|
})
|
|
],
|
|
);
|
|
}),
|
|
);
|
|
}
|
|
}
|