Skip to content

Commit

Permalink
Hide theme setting when embedded (flutter#7708)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzieschmoll authored May 6, 2024
1 parent 7789271 commit 709624a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/devtools_app/lib/src/framework/settings_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import '../shared/config_specific/copy_to_clipboard/copy_to_clipboard.dart';
import '../shared/globals.dart';
import '../shared/log_storage.dart';
import '../shared/server/server.dart';
import '../shared/utils.dart';

class OpenSettingsAction extends ScaffoldAction {
OpenSettingsAction({super.key, super.color})
Expand Down Expand Up @@ -44,14 +45,15 @@ class SettingsDialog extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: CheckboxSetting(
title: 'Use a dark theme',
notifier: preferences.darkModeTheme,
onChanged: preferences.toggleDarkModeTheme,
gaItem: gac.darkTheme,
if (!isEmbedded())
Flexible(
child: CheckboxSetting(
title: 'Use a dark theme',
notifier: preferences.darkModeTheme,
onChanged: preferences.toggleDarkModeTheme,
gaItem: gac.darkTheme,
),
),
),
if (isExternalBuild && isDevToolsServerAvailable)
Flexible(
child: CheckboxSetting(
Expand Down

0 comments on commit 709624a

Please sign in to comment.