Unverified Commit 2f7804f4 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Add null safety note to flutter create (#74265)

parent 3fbe1a59
......@@ -311,6 +311,11 @@ In order to run your $application, type:
\$ cd $relativeAppPath
\$ flutter run
To enable null safety, type:
\$ cd $relativeAppPath
\$ dart migrate --apply-changes
Your $application code is in $relativeAppMain.
''');
}
......
......@@ -2335,6 +2335,25 @@ void main() {
FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: false),
Logger: () => logger,
});
testUsingContext('flutter create prints note about null safety', () async {
await _createProject(
projectDir,
<String>[],
<String>[],
);
expect(logger.statusText, contains('dart migrate --apply-changes'));
}, overrides: <Type, Generator>{
Pub: () => Pub(
fileSystem: globals.fs,
logger: globals.logger,
processManager: globals.processManager,
usage: globals.flutterUsage,
botDetector: globals.botDetector,
platform: globals.platform,
),
Logger: () => logger,
});
}
Future<void> _createProject(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment