File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
test/commands.shard/permeable Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ class CreateCommand extends CreateBase {
339
339
linux: includeLinux,
340
340
macos: includeMacos,
341
341
windows: includeWindows,
342
- dartSdkVersionBounds: "'>= $dartSdk <4.0.0'" ,
342
+ dartSdkVersionBounds: '^ $dartSdk ' ,
343
343
implementationTests: boolArg ('implementation-tests' ),
344
344
agpVersion: gradle.templateAndroidGradlePluginVersion,
345
345
kotlinVersion: gradle.templateKotlinGradlePluginVersion,
Original file line number Diff line number Diff line change @@ -3446,6 +3446,27 @@ void main() {
3446
3446
expect (pubspec.description, 'a: b' );
3447
3447
});
3448
3448
3449
+ testUsingContext ('should use caret syntax in SDK version' , () async {
3450
+ await _createProject (
3451
+ projectDir,
3452
+ < String > [
3453
+ '--no-pub' ,
3454
+ ],
3455
+ < String > [
3456
+ 'pubspec.yaml' ,
3457
+ ],
3458
+ );
3459
+
3460
+ final String rawPubspec = await projectDir.childFile ('pubspec.yaml' ).readAsString ();
3461
+ final Pubspec pubspec = Pubspec .parse (rawPubspec);
3462
+
3463
+ expect (
3464
+ pubspec.environment! ['sdk' ].toString (),
3465
+ startsWith ('^' ),
3466
+ reason: 'The caret syntax is recommended over the traditional syntax.' ,
3467
+ );
3468
+ });
3469
+
3449
3470
testUsingContext ('create an FFI plugin with ios, then add macos' , () async {
3450
3471
Cache .flutterRoot = '../..' ;
3451
3472
You can’t perform that action at this time.
0 commit comments