@@ -561,24 +561,18 @@ class VmServicePortOptionsBundle extends OptionBundle {
561561
562562/// A bundle encapsulating DDS and DevTools options (`--dds` , `--dds-port` , `--disable-dds` , `--devtools` , `--devtools-server-address` ).
563563class DdsAndDevToolsOptionsBundle extends OptionBundle {
564- const DdsAndDevToolsOptionsBundle ({
565- this .includeDevTools = true ,
566- this .includeEnableDevTools = true ,
567- });
564+ const DdsAndDevToolsOptionsBundle ({this .includeDevTools = true });
568565
569566 final bool includeDevTools;
570- final bool includeEnableDevTools;
571567
572568 @override
573569 List <OptionDescriptor <Object ?>> get descriptors => < OptionDescriptor <Object ?>> [
574570 DebuggingOptionDescriptors .ddsPort,
575571 DebuggingOptionDescriptors .dds,
576572 DebuggingOptionDescriptors .disableDds,
577- if (includeDevTools) ...< OptionDescriptor <Object ?>> [
578- if (includeEnableDevTools) DebuggingOptionDescriptors .enableDevTools,
579- DebuggingOptionDescriptors .devToolsServerAddress (
580- includeEnableDevTools: includeEnableDevTools,
581- ),
573+ if (includeDevTools) ...const < OptionDescriptor <Object ?>> [
574+ DebuggingOptionDescriptors .enableDevTools,
575+ DebuggingOptionDescriptors .devToolsServerAddress,
582576 ],
583577 ];
584578}
@@ -881,28 +875,17 @@ abstract final class DebuggingOptionDescriptors {
881875 'Specifying port 0 (the default) will find a random free port.' ,
882876 );
883877
878+ static const publishPortHelp =
879+ 'Publish the VM service port over mDNS. Disable to prevent the '
880+ 'local network permission app dialog in debug and profile build modes (iOS devices only).' ;
881+
884882 static const publishPort = FlagOptionDescriptor (
885883 name: 'publish-port' ,
886884 defaultsTo: true ,
887885 verboseOnly: true ,
888- help:
889- 'Publish the VM service port over mDNS. Disable to prevent the '
890- 'local network permission app dialog in debug and profile build modes (iOS devices only).' ,
886+ help: publishPortHelp,
891887 );
892888
893- static FlagOptionDescriptor publishPortOption ({bool enabledByDefault = true }) {
894- if (enabledByDefault) {
895- return publishPort;
896- }
897- return const FlagOptionDescriptor (
898- name: 'publish-port' ,
899- verboseOnly: true ,
900- help:
901- 'Publish the VM service port over mDNS. Disable to prevent the '
902- 'local network permission app dialog in debug and profile build modes (iOS devices only).' ,
903- );
904- }
905-
906889 static const disableDds = FlagOptionDescriptor (
907890 name: 'disable-dds' ,
908891 verboseOnly: true ,
@@ -921,27 +904,17 @@ abstract final class DebuggingOptionDescriptors {
921904 'If "--no-${FlutterCommand .kEnableDevTools }" is specified, "--${FlutterCommand .kDevToolsServerAddress }" is ignored.' ,
922905 );
923906
924- static StringOptionDescriptor devToolsServerAddress ({bool includeEnableDevTools = true }) {
925- final ignoredMessage = includeEnableDevTools
926- ? ' Ignored if "--no-${FlutterCommand .kEnableDevTools }" is specified.'
927- : '' ;
928- return StringOptionDescriptor (
929- name: FlutterCommand .kDevToolsServerAddress,
930- verboseOnly: true ,
931- help:
932- 'When this value is provided, the Flutter tool will not spin up a '
933- 'new DevTools server instance, and will instead use the one provided '
934- 'at the given address.$ignoredMessage ' ,
935- );
936- }
907+ static const devToolsServerAddressBaseHelp =
908+ 'When this value is provided, the Flutter tool will not spin up a '
909+ 'new DevTools server instance, and will instead use the one provided '
910+ 'at the given address.' ;
937911
938- static const devToolsServerAddressOption = StringOptionDescriptor (
912+ static const devToolsServerAddress = StringOptionDescriptor (
939913 name: FlutterCommand .kDevToolsServerAddress,
940914 verboseOnly: true ,
941915 help:
942- 'When this value is provided, the Flutter tool will not spin up a '
943- 'new DevTools server instance, and will instead use the one provided '
944- 'at the given address.' ,
916+ '$devToolsServerAddressBaseHelp '
917+ 'Ignored if "--no-${FlutterCommand .kEnableDevTools }" is specified.' ,
945918 );
946919
947920 static const ipv6 = FlagOptionDescriptor (
@@ -1018,17 +991,6 @@ abstract final class DebuggingOptionDescriptors {
1018991 '(Not recommended. This can open your device to remote code execution attacks.)' ,
1019992 );
1020993
1021- static FlagOptionDescriptor startPaused ({bool defaultsTo = false }) => FlagOptionDescriptor (
1022- name: 'start-paused' ,
1023- defaultsTo: defaultsTo,
1024- help: 'Start in a paused mode and wait for a debugger to connect.' ,
1025- );
1026-
1027- static const startPausedOption = FlagOptionDescriptor (
1028- name: 'start-paused' ,
1029- help: 'Start in a paused mode and wait for a debugger to connect.' ,
1030- );
1031-
1032994 static const dartFlags = StringOptionDescriptor (
1033995 name: 'dart-flags' ,
1034996 verboseOnly: true ,
0 commit comments