hide exchange toggle on disabled platforms

This commit is contained in:
julian 2024-11-28 08:27:08 -06:00 committed by julian-CStack
parent 1ce4bee68c
commit dbf68f2a68
2 changed files with 89 additions and 83 deletions

View file

@ -184,9 +184,11 @@ class AdvancedSettingsView extends StatelessWidget {
), ),
), ),
// showExchange pref. // showExchange pref.
if (Constants.enableExchange)
const SizedBox( const SizedBox(
height: 8, height: 8,
), ),
if (Constants.enableExchange)
RoundedWhiteContainer( RoundedWhiteContainer(
child: Consumer( child: Consumer(
builder: (_, ref, __) { builder: (_, ref, __) {

View file

@ -17,6 +17,7 @@ import '../../../../pages/settings_views/global_settings_view/advanced_views/man
import '../../../../providers/global/prefs_provider.dart'; import '../../../../providers/global/prefs_provider.dart';
import '../../../../themes/stack_colors.dart'; import '../../../../themes/stack_colors.dart';
import '../../../../utilities/assets.dart'; import '../../../../utilities/assets.dart';
import '../../../../utilities/constants.dart';
import '../../../../utilities/text_styles.dart'; import '../../../../utilities/text_styles.dart';
import '../../../../widgets/custom_buttons/draggable_switch_button.dart'; import '../../../../widgets/custom_buttons/draggable_switch_button.dart';
import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/desktop/primary_button.dart';
@ -163,12 +164,14 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
), ),
), ),
// showExchange pref. // showExchange pref.
if (Constants.enableExchange)
const Padding( const Padding(
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Divider( child: Divider(
thickness: 0.5, thickness: 0.5,
), ),
), ),
if (Constants.enableExchange)
Padding( Padding(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
child: Row( child: Row(
@ -176,7 +179,8 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
children: [ children: [
Text( Text(
"Enable exchange features", "Enable exchange features",
style: STextStyles.desktopTextExtraSmall(context) style:
STextStyles.desktopTextExtraSmall(context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!