fix: scrollable other settings page (#2771)
malik1004x committed
Dec 29, 2025 at 19:31 UTC
95dc0313ffe7acb9061cd9a7ff830e3a8091c715
1 file changed
+126
-119
lib/src/screens/settings/other_settings_page.dart
+126
-119
@@ -34,129 +34,136 @@ class OtherSettingsPage extends BasePage {
34
padding: EdgeInsets.only(top: 10),
35
child: Column(
36
children: [
37
- if (_otherSettingsViewModel.displayTransactionPriority)
38
- _otherSettingsViewModel.walletType == WalletType.bitcoin
39
- ? SettingsPriorityPickerCell(
40
- title: S.current.settings_fee_priority,
41
- items: priorityForWalletType(_otherSettingsViewModel.walletType),
42
- displayItem: _otherSettingsViewModel.getDisplayBitcoinPriority,
43
- selectedItem: _otherSettingsViewModel.transactionPriority,
44
- customItemIndex: _otherSettingsViewModel.customPriorityItemIndex,
45
- onItemSelected: _otherSettingsViewModel.onDisplayBitcoinPrioritySelected,
46
- customValue: _otherSettingsViewModel.customBitcoinFeeRate,
47
- maxValue: _otherSettingsViewModel.maxCustomFeeRate?.toDouble(),
48
- )
49
- : SettingsPickerCell(
50
- title: S.current.settings_fee_priority,
51
- items: priorityForWalletType(_otherSettingsViewModel.walletType),
52
- displayItem: _otherSettingsViewModel.getDisplayPriority,
53
- selectedItem: _otherSettingsViewModel.transactionPriority,
54
- onItemSelected: _otherSettingsViewModel.onDisplayPrioritySelected,
37
+ Expanded(
38
+ child: SingleChildScrollView(
39
+ child: Column(
40
+ children: [
41
+ if (_otherSettingsViewModel.displayTransactionPriority)
42
+ _otherSettingsViewModel.walletType == WalletType.bitcoin
43
+ ? SettingsPriorityPickerCell(
44
+ title: S.current.settings_fee_priority,
45
+ items: priorityForWalletType(_otherSettingsViewModel.walletType),
46
+ displayItem: _otherSettingsViewModel.getDisplayBitcoinPriority,
47
+ selectedItem: _otherSettingsViewModel.transactionPriority,
48
+ customItemIndex: _otherSettingsViewModel.customPriorityItemIndex,
49
+ onItemSelected: _otherSettingsViewModel.onDisplayBitcoinPrioritySelected,
50
+ customValue: _otherSettingsViewModel.customBitcoinFeeRate,
51
+ maxValue: _otherSettingsViewModel.maxCustomFeeRate?.toDouble(),
52
+ )
53
+ : SettingsPickerCell(
54
+ title: S.current.settings_fee_priority,
55
+ items: priorityForWalletType(_otherSettingsViewModel.walletType),
56
+ displayItem: _otherSettingsViewModel.getDisplayPriority,
57
+ selectedItem: _otherSettingsViewModel.transactionPriority,
58
+ onItemSelected: _otherSettingsViewModel.onDisplayPrioritySelected,
59
+ ),
60
+ if (_otherSettingsViewModel.changeRepresentativeEnabled)
61
+ SettingsCellWithArrow(
62
+ title: S.current.change_rep,
63
+ handler: (context) => Navigator.of(context).pushNamed(Routes.changeRep),
64
+ ),
65
+ if (_otherSettingsViewModel.changeHardwareWalletTypeEnabled)
66
+ SettingsCellWithArrow(
67
+ title: "Hardware wallet manufacturer",
68
+ handler: (context) => Navigator.of(context)
69
+ .pushNamed(Routes.restoreWalletFromHardwareWallet, arguments: {
70
+ "showUnavailable": false,
71
+ "availableHardwareWalletTypes": [
72
+ HardwareWalletType.cupcake,
73
+ HardwareWalletType.coldcard,
74
+ HardwareWalletType.seedsigner,
75
+ ],
76
+ "onSelect": (BuildContext context, HardwareWalletType hwType) async {
77
+ await _otherSettingsViewModel.onHardwareWalletTypeChanged(hwType);
78
+ Navigator.pop(context);
79
+ },
80
+ }),
81
+ ),
82
+ SettingsCellWithArrow(
83
+ title: S.current.settings_terms_and_conditions,
84
+ handler: (context) => Navigator.of(context).pushNamed(Routes.readDisclaimer),
85
),
56
- if (_otherSettingsViewModel.changeRepresentativeEnabled)
57
- SettingsCellWithArrow(
58
- title: S.current.change_rep,
59
- handler: (context) => Navigator.of(context).pushNamed(Routes.changeRep),
60
- ),
61
- if (_otherSettingsViewModel.changeHardwareWalletTypeEnabled)
62
- SettingsCellWithArrow(
63
- title: "Hardware wallet manufacturer",
64
- handler: (context) => Navigator.of(context)
65
- .pushNamed(Routes.restoreWalletFromHardwareWallet, arguments: {
66
- "showUnavailable": false,
67
- "availableHardwareWalletTypes": [
68
- HardwareWalletType.cupcake,
69
- HardwareWalletType.coldcard,
70
- HardwareWalletType.seedsigner,
86
+ if (FeatureFlag.hasDevOptions &&
87
+ _otherSettingsViewModel.walletType == WalletType.monero)
88
+ SettingsCellWithArrow(
89
+ title: '[dev] monero background sync',
90
+ handler: (context) =>
91
+ Navigator.of(context).pushNamed(Routes.devMoneroBackgroundSync),
92
+ ),
93
+ if (FeatureFlag.hasDevOptions &&
94
+ [WalletType.monero, WalletType.wownero, WalletType.zano]
95
+ .contains(_otherSettingsViewModel.walletType))
96
+ SettingsCellWithArrow(
97
+ title: '[dev] xmr call profiler',
98
+ handler: (context) =>
99
+ Navigator.of(context).pushNamed(Routes.devMoneroCallProfiler),
100
+ ),
101
+ if (FeatureFlag.hasDevOptions &&
102
+ [WalletType.monero].contains(_otherSettingsViewModel.walletType))
103
+ SettingsCellWithArrow(
104
+ title: '[dev] xmr wallet cache debug',
105
+ handler: (context) =>
106
+ Navigator.of(context).pushNamed(Routes.devMoneroWalletCacheDebug),
107
+ ),
108
+ if (FeatureFlag.hasDevOptions)
109
+ SettingsCellWithArrow(
110
+ title: '[dev] shared preferences',
111
+ handler: (context) =>
112
+ Navigator.of(context).pushNamed(Routes.devSharedPreferences),
113
+ ),
114
+ if (FeatureFlag.hasDevOptions)
115
+ SettingsCellWithArrow(
116
+ title: '[dev] secure storage preferences',
117
+ handler: (context) =>
118
+ Navigator.of(context).pushNamed(Routes.devSecurePreferences),
119
+ ),
120
+ if (FeatureFlag.hasDevOptions)
121
+ SettingsCellWithArrow(
122
+ title: '[dev] background sync logs',
123
+ handler: (context) =>
124
+ Navigator.of(context).pushNamed(Routes.devBackgroundSyncLogs),
125
+ ),
126
+ if (FeatureFlag.hasDevOptions)
127
+ SettingsCellWithArrow(
128
+ title: '[dev] socket health logs',
129
+ handler: (context) => Navigator.of(context).pushNamed(Routes.devSocketHealthLogs),
130
+ ),
131
+ if (FeatureFlag.hasDevOptions)
132
+ SettingsCellWithArrow(
133
+ title: '[dev] network requests logs',
134
+ handler: (context) => Navigator.of(context).pushNamed(Routes.devNetworkRequests),
135
+ ),
136
+ if (FeatureFlag.hasDevOptions)
137
+ SettingsCellWithArrow(
138
+ title: '[dev] exchange provider logs',
139
+ handler: (context) =>
140
+ Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs),
141
+ ),
142
+ if (FeatureFlag.hasDevOptions)
143
+ SettingsCellWithArrow(
144
+ title: '[dev] *QR tools',
145
+ handler: (context) => Navigator.of(context).pushNamed(Routes.devQRTools),
146
+ ),
147
+ if (FeatureFlag.hasDevOptions)
148
+ SettingsCellWithArrow(
149
+ title: '[dev] exchange provider logs',
150
+ handler: (BuildContext context) =>
151
+ Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs),
152
+ ),
153
+ if (FeatureFlag.hasDevOptions)
154
+ SettingsCellWithArrow(
155
+ title: '[dev] browse sqlite db',
156
+ handler: (BuildContext context) async {
157
+ final data = await dumpDb();
158
+ Navigator.of(context).push(
159
+ MaterialPageRoute(builder: (context) => JsonExplorerPage(data: data, title: 'sqlite db')),
160
+ );
161
+ }
162
+ ),
163
],
72
- "onSelect": (BuildContext context, HardwareWalletType hwType) async {
73
- await _otherSettingsViewModel.onHardwareWalletTypeChanged(hwType);
74
- Navigator.pop(context);
75
- },
76
- }),
164
+ ),
165
),
78
- SettingsCellWithArrow(
79
- title: S.current.settings_terms_and_conditions,
80
- handler: (context) => Navigator.of(context).pushNamed(Routes.readDisclaimer),
166
),
82
- if (FeatureFlag.hasDevOptions &&
83
- _otherSettingsViewModel.walletType == WalletType.monero)
84
- SettingsCellWithArrow(
85
- title: '[dev] monero background sync',
86
- handler: (context) =>
87
- Navigator.of(context).pushNamed(Routes.devMoneroBackgroundSync),
88
- ),
89
- if (FeatureFlag.hasDevOptions &&
90
- [WalletType.monero, WalletType.wownero, WalletType.zano]
91
- .contains(_otherSettingsViewModel.walletType))
92
- SettingsCellWithArrow(
93
- title: '[dev] xmr call profiler',
94
- handler: (context) =>
95
- Navigator.of(context).pushNamed(Routes.devMoneroCallProfiler),
96
- ),
97
- if (FeatureFlag.hasDevOptions &&
98
- [WalletType.monero].contains(_otherSettingsViewModel.walletType))
99
- SettingsCellWithArrow(
100
- title: '[dev] xmr wallet cache debug',
101
- handler: (context) =>
102
- Navigator.of(context).pushNamed(Routes.devMoneroWalletCacheDebug),
103
- ),
104
- if (FeatureFlag.hasDevOptions)
105
- SettingsCellWithArrow(
106
- title: '[dev] shared preferences',
107
- handler: (context) =>
108
- Navigator.of(context).pushNamed(Routes.devSharedPreferences),
109
- ),
110
- if (FeatureFlag.hasDevOptions)
111
- SettingsCellWithArrow(
112
- title: '[dev] secure storage preferences',
113
- handler: (context) =>
114
- Navigator.of(context).pushNamed(Routes.devSecurePreferences),
115
- ),
116
- if (FeatureFlag.hasDevOptions)
117
- SettingsCellWithArrow(
118
- title: '[dev] background sync logs',
119
- handler: (context) =>
120
- Navigator.of(context).pushNamed(Routes.devBackgroundSyncLogs),
121
- ),
122
- if (FeatureFlag.hasDevOptions)
123
- SettingsCellWithArrow(
124
- title: '[dev] socket health logs',
125
- handler: (context) => Navigator.of(context).pushNamed(Routes.devSocketHealthLogs),
126
- ),
127
- if (FeatureFlag.hasDevOptions)
128
- SettingsCellWithArrow(
129
- title: '[dev] network requests logs',
130
- handler: (context) => Navigator.of(context).pushNamed(Routes.devNetworkRequests),
131
- ),
132
- if (FeatureFlag.hasDevOptions)
133
- SettingsCellWithArrow(
134
- title: '[dev] exchange provider logs',
135
- handler: (context) =>
136
- Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs),
137
- ),
138
- if (FeatureFlag.hasDevOptions)
139
- SettingsCellWithArrow(
140
- title: '[dev] *QR tools',
141
- handler: (context) => Navigator.of(context).pushNamed(Routes.devQRTools),
142
- ),
143
- if (FeatureFlag.hasDevOptions)
144
- SettingsCellWithArrow(
145
- title: '[dev] exchange provider logs',
146
- handler: (BuildContext context) =>
147
- Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs),
148
- ),
149
- if (FeatureFlag.hasDevOptions)
150
- SettingsCellWithArrow(
151
- title: '[dev] browse sqlite db',
152
- handler: (BuildContext context) async {
153
- final data = await dumpDb();
154
- Navigator.of(context).push(
155
- MaterialPageRoute(builder: (context) => JsonExplorerPage(data: data, title: 'sqlite db')),
156
- );
157
- }
158
- ),
159
- Spacer(),
167
SettingsVersionCell(
168
title: S.of(context).version(_otherSettingsViewModel.currentVersion),
169
),