Skip to content

Commit 6bf3ccd

Browse files
[flutter_tools] fix instructions to disable CLI animations (flutter#139094)
Fixes flutter#139011
1 parent 6035c5c commit 6bf3ccd

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

packages/flutter_tools/lib/src/features.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,14 @@ const Feature flutterWebWasm = Feature(
156156
),
157157
);
158158

159+
const String kCliAnimationsFeatureName = 'cli-animations';
160+
159161
/// The [Feature] for CLI animations.
160162
///
161163
/// The TERM environment variable set to "dumb" turns this off.
162164
const Feature cliAnimation = Feature.fullyEnabled(
163165
name: 'animations in the command line interface',
164-
configSetting: 'cli-animations',
166+
configSetting: kCliAnimationsFeatureName,
165167
);
166168

167169
/// Enable native assets compilation and bundling.

packages/flutter_tools/lib/src/reporting/first_run.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const String _kFlutterFirstRunMessage = '''
3636
║ See Google's privacy policy: ║
3737
║ https://policies.google.com/privacy ║
3838
║ ║
39-
║ To disable animations in this tool, use 'flutter config --no-animations'. ║
39+
║ To disable animations in this tool, use ║
40+
║ 'flutter config --no-cli-animations'. ║
4041
╚════════════════════════════════════════════════════════════════════════════╝
4142
''';
4243

packages/flutter_tools/test/general.shard/reporting/first_run_test.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import 'package:file/memory.dart';
66
import 'package:flutter_tools/src/base/logger.dart';
7+
import 'package:flutter_tools/src/features.dart';
78
import 'package:flutter_tools/src/persistent_tool_state.dart';
89
import 'package:flutter_tools/src/reporting/first_run.dart';
910

@@ -16,6 +17,12 @@ void main() {
1617
expect(messenger.licenseTerms, contains('Welcome to Flutter'));
1718
});
1819

20+
testWithoutContext('FirstRunMessenger informs user how to disable animations', () {
21+
final FirstRunMessenger messenger = setUpFirstRunMessenger(redisplayWelcomeMessage: false);
22+
23+
expect(messenger.licenseTerms, contains('flutter config --no-$kCliAnimationsFeatureName'));
24+
});
25+
1926
testWithoutContext('FirstRunMessenger requires redisplay if it has never been run before', () {
2027
final FirstRunMessenger messenger = setUpFirstRunMessenger();
2128

0 commit comments

Comments
 (0)