forked from firka/flutter
Enable null safety by default in templates (#78619)
This commit is contained in:
@@ -242,8 +242,8 @@ class CreateCommand extends CreateBase {
|
||||
macos: featureFlags.isMacOSEnabled && platforms.contains('macos'),
|
||||
windows: featureFlags.isWindowsEnabled && platforms.contains('windows'),
|
||||
windowsUwp: featureFlags.isWindowsUwpEnabled && platforms.contains('winuwp'),
|
||||
// Enable null-safety for sample code, which is - unlike our regular templates - already migrated.
|
||||
dartSdkVersionBounds: sampleCode != null ? '">=2.12.0-0 <3.0.0"' : '">=2.7.0 <3.0.0"'
|
||||
// Enable null safety everywhere.
|
||||
dartSdkVersionBounds: '">=2.12.0 <3.0.0"'
|
||||
);
|
||||
|
||||
final String relativeDirPath = globals.fs.path.relative(projectDirPath);
|
||||
@@ -325,11 +325,6 @@ 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.
|
||||
''');
|
||||
// Show warning if any selected platform is not enabled
|
||||
|
||||
Reference in New Issue
Block a user