Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
dc481b23
Unverified
Commit
dc481b23
authored
Apr 21, 2023
by
Michael Thomsen
Committed by
GitHub
Apr 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup flutter config output (#122384)
parent
d4f884e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
18 deletions
+9
-18
features.dart
packages/flutter_tools/lib/src/features.dart
+4
-8
features_test.dart
packages/flutter_tools/test/general.shard/features_test.dart
+5
-10
No files found.
packages/flutter_tools/lib/src/features.dart
View file @
dc481b23
...
@@ -239,21 +239,17 @@ class Feature {
...
@@ -239,21 +239,17 @@ class Feature {
if
(
configSetting
==
null
)
{
if
(
configSetting
==
null
)
{
return
null
;
return
null
;
}
}
final
StringBuffer
buffer
=
StringBuffer
(
'Enable or disable
$name
. '
final
StringBuffer
buffer
=
StringBuffer
(
'Enable or disable
$name
.'
);
'This setting will take effect on '
);
final
List
<
String
>
channels
=
<
String
>[
final
List
<
String
>
channels
=
<
String
>[
if
(
master
.
available
)
'master'
,
if
(
master
.
available
)
'master'
,
if
(
beta
.
available
)
'beta'
,
if
(
beta
.
available
)
'beta'
,
if
(
stable
.
available
)
'stable'
,
if
(
stable
.
available
)
'stable'
,
];
];
// Add channel info for settings only on some channels.
if
(
channels
.
length
==
1
)
{
if
(
channels
.
length
==
1
)
{
buffer
.
write
(
'the
${channels.single}
channel.'
);
buffer
.
write
(
'
\n
This setting applies to only
the
${channels.single}
channel.'
);
}
else
if
(
channels
.
length
==
2
)
{
}
else
if
(
channels
.
length
==
2
)
{
buffer
.
write
(
'the
${channels.join(' and ')}
channels.'
);
buffer
.
write
(
'
\n
This setting applies to only the
${channels.join(' and ')}
channels.'
);
}
else
{
final
String
prefix
=
(
channels
.
toList
()
..
removeLast
()).
join
(
', '
);
buffer
.
write
(
'the
$prefix
, and
${channels.last}
channels.'
);
}
}
if
(
extraHelpText
!=
null
)
{
if
(
extraHelpText
!=
null
)
{
buffer
.
write
(
'
$extraHelpText
'
);
buffer
.
write
(
'
$extraHelpText
'
);
...
...
packages/flutter_tools/test/general.shard/features_test.dart
View file @
dc481b23
...
@@ -89,26 +89,22 @@ void main() {
...
@@ -89,26 +89,22 @@ void main() {
testWithoutContext
(
'Flutter web help string'
,
()
{
testWithoutContext
(
'Flutter web help string'
,
()
{
expect
(
flutterWebFeature
.
generateHelpMessage
(),
expect
(
flutterWebFeature
.
generateHelpMessage
(),
'Enable or disable Flutter for web. '
'Enable or disable Flutter for web.'
);
'This setting will take effect on the master, beta, and stable channels.'
);
});
});
testWithoutContext
(
'Flutter macOS desktop help string'
,
()
{
testWithoutContext
(
'Flutter macOS desktop help string'
,
()
{
expect
(
flutterMacOSDesktopFeature
.
generateHelpMessage
(),
expect
(
flutterMacOSDesktopFeature
.
generateHelpMessage
(),
'Enable or disable support for desktop on macOS. '
'Enable or disable support for desktop on macOS.'
);
'This setting will take effect on the master, beta, and stable channels.'
);
});
});
testWithoutContext
(
'Flutter Linux desktop help string'
,
()
{
testWithoutContext
(
'Flutter Linux desktop help string'
,
()
{
expect
(
flutterLinuxDesktopFeature
.
generateHelpMessage
(),
expect
(
flutterLinuxDesktopFeature
.
generateHelpMessage
(),
'Enable or disable support for desktop on Linux. '
'Enable or disable support for desktop on Linux.'
);
'This setting will take effect on the master, beta, and stable channels.'
);
});
});
testWithoutContext
(
'Flutter Windows desktop help string'
,
()
{
testWithoutContext
(
'Flutter Windows desktop help string'
,
()
{
expect
(
flutterWindowsDesktopFeature
.
generateHelpMessage
(),
expect
(
flutterWindowsDesktopFeature
.
generateHelpMessage
(),
'Enable or disable support for desktop on Windows. '
'Enable or disable support for desktop on Windows.'
);
'This setting will take effect on the master, beta, and stable channels.'
);
});
});
testWithoutContext
(
'help string on multiple channels'
,
()
{
testWithoutContext
(
'help string on multiple channels'
,
()
{
...
@@ -120,8 +116,7 @@ void main() {
...
@@ -120,8 +116,7 @@ void main() {
configSetting:
'foo'
,
configSetting:
'foo'
,
);
);
expect
(
testWithoutContextFeature
.
generateHelpMessage
(),
'Enable or disable example. '
expect
(
testWithoutContextFeature
.
generateHelpMessage
(),
'Enable or disable example.'
);
'This setting will take effect on the master, beta, and stable channels.'
);
});
});
/// Flutter Web
/// Flutter Web
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment