forked from firka/flutter
Make flutter create --smaple null-safe (#74844)
This commit is contained in:
committed by
GitHub
parent
d11fe85676
commit
63267e9016
@@ -236,6 +236,8 @@ class CreateCommand extends CreateBase {
|
||||
linux: featureFlags.isLinuxEnabled && platforms.contains('linux'),
|
||||
macos: featureFlags.isMacOSEnabled && platforms.contains('macos'),
|
||||
windows: featureFlags.isWindowsEnabled && platforms.contains('windows'),
|
||||
// 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"'
|
||||
);
|
||||
|
||||
final String relativeDirPath = globals.fs.path.relative(projectDirPath);
|
||||
|
||||
@@ -311,6 +311,7 @@ abstract class CreateBase extends FlutterCommand {
|
||||
String androidLanguage,
|
||||
String iosLanguage,
|
||||
String flutterRoot,
|
||||
String dartSdkVersionBounds,
|
||||
bool withPluginHook = false,
|
||||
bool ios = false,
|
||||
bool android = false,
|
||||
@@ -364,6 +365,7 @@ abstract class CreateBase extends FlutterCommand {
|
||||
'macos': macos,
|
||||
'windows': windows,
|
||||
'year': DateTime.now().year,
|
||||
'dartSdkVersionBounds': dartSdkVersionBounds,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user