[flutter_releases] Flutter Framework 1.26.0-17.6.pre Beta Cherrypicks (#75937)
* Update engine hash to 1.26.0-17.6.pre
* Fix for #75792 - allow use of Animator<Color?> with LinearProgressIndicator (#75794)
* [flutter_tools] catch error 32 in cache (#75719)
* Avoid duplicating Pods-Runner xcconfig #includes (#75822)
Co-authored-by: Miguel Beltran <m@beltran.work>
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
diff --git a/bin/internal/engine.version b/bin/internal/engine.version
index 190b5ff..311d862 100644
--- a/bin/internal/engine.version
+++ b/bin/internal/engine.version
@@ -1 +1 @@
-d4453f601890ec682bbf8f5659b70f15cce1d67d
+21fa8bb99e9a20563d9a7d39afeba8e5c811a7eb
diff --git a/packages/flutter/lib/src/material/progress_indicator.dart b/packages/flutter/lib/src/material/progress_indicator.dart
index a7a6496..c909fe2 100644
--- a/packages/flutter/lib/src/material/progress_indicator.dart
+++ b/packages/flutter/lib/src/material/progress_indicator.dart
@@ -305,7 +305,7 @@
Key? key,
double? value,
Color? backgroundColor,
- Animation<Color>? valueColor,
+ Animation<Color?>? valueColor,
this.minHeight,
String? semanticsLabel,
String? semanticsValue,
diff --git a/packages/flutter/test/material/progress_indicator_test.dart b/packages/flutter/test/material/progress_indicator_test.dart
index 55fec92..9a667de 100644
--- a/packages/flutter/test/material/progress_indicator_test.dart
+++ b/packages/flutter/test/material/progress_indicator_test.dart
@@ -196,6 +196,31 @@
);
});
+ testWidgets('LinearProgressIndicator with animation with null colors', (WidgetTester tester) async {
+ await tester.pumpWidget(
+ const Directionality(
+ textDirection: TextDirection.ltr,
+ child: Center(
+ child: SizedBox(
+ width: 200.0,
+ child: LinearProgressIndicator(
+ value: 0.25,
+ valueColor: AlwaysStoppedAnimation<Color?>(null),
+ backgroundColor: Colors.black,
+ ),
+ ),
+ ),
+ ),
+ );
+
+ expect(
+ find.byType(LinearProgressIndicator),
+ paints
+ ..rect(rect: const Rect.fromLTRB(0.0, 0.0, 200.0, 4.0))
+ ..rect(rect: const Rect.fromLTRB(0.0, 0.0, 50.0, 4.0)),
+ );
+ });
+
testWidgets('CircularProgressIndicator(value: 0.0) can be constructed and has value semantics by default', (WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
index 177ab45..197bf54 100644
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -1794,7 +1794,24 @@
final Directory destination = location.childDirectory(
tempFile.fileSystem.path.basenameWithoutExtension(tempFile.path)
);
- ErrorHandlingFileSystem.deleteIfExists(destination, recursive: true);
+ try {
+ ErrorHandlingFileSystem.deleteIfExists(
+ destination,
+ recursive: true,
+ );
+ } on FileSystemException catch (error) {
+ // Error that indicates another program has this file open and that it
+ // cannot be deleted. For the cache, this is either the analyzer reading
+ // the sky_engine package or a running flutter_tester device.
+ const int kSharingViolation = 32;
+ if (_platform.isWindows && error.osError.errorCode == kSharingViolation) {
+ throwToolExit(
+ 'Failed to delete ${destination.path} because the local file/directory is in use '
+ 'by another process. Try closing any running IDEs or editors and trying '
+ 'again'
+ );
+ }
+ }
_ensureExists(location);
try {
diff --git a/packages/flutter_tools/lib/src/macos/cocoapods.dart b/packages/flutter_tools/lib/src/macos/cocoapods.dart
index 226de78..08b9acb 100644
--- a/packages/flutter_tools/lib/src/macos/cocoapods.dart
+++ b/packages/flutter_tools/lib/src/macos/cocoapods.dart
@@ -272,9 +272,10 @@
final File file = xcodeProject.xcodeConfigFor(mode);
if (file.existsSync()) {
final String content = file.readAsStringSync();
- final String include = '#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.${mode
- .toLowerCase()}.xcconfig"';
- if (!content.contains(include)) {
+ final String includeFile = 'Pods/Target Support Files/Pods-Runner/Pods-Runner.${mode
+ .toLowerCase()}.xcconfig';
+ final String include = '#include? "$includeFile"';
+ if (!content.contains(includeFile)) {
file.writeAsStringSync('$include\n$content', flush: true);
}
}
diff --git a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
index 7922649..9f76455 100644
--- a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
+++ b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
@@ -283,6 +283,34 @@
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.any(),
});
+
+ testUsingContext('does not include Pod config in xcconfig files, if legacy non-option include present', () async {
+ projectUnderTest.ios.podfile..createSync()..writeAsStringSync('Existing Podfile');
+
+ const String legacyDebugInclude = '#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig';
+ projectUnderTest.ios.xcodeConfigFor('Debug')
+ ..createSync(recursive: true)
+ ..writeAsStringSync(legacyDebugInclude);
+ const String legacyReleaseInclude = '#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig';
+ projectUnderTest.ios.xcodeConfigFor('Release')
+ ..createSync(recursive: true)
+ ..writeAsStringSync(legacyReleaseInclude);
+
+ final FlutterProject project = FlutterProject.fromPath('project');
+ await cocoaPodsUnderTest.setupPodfile(project.ios);
+
+ final String debugContents = projectUnderTest.ios.xcodeConfigFor('Debug').readAsStringSync();
+ // Redundant contains check, but this documents what we're testing--that the optional
+ // #include? doesn't get written in addition to the previous style #include.
+ expect(debugContents, isNot(contains('#include?')));
+ expect(debugContents, equals(legacyDebugInclude));
+ final String releaseContents = projectUnderTest.ios.xcodeConfigFor('Release').readAsStringSync();
+ expect(releaseContents, isNot(contains('#include?')));
+ expect(releaseContents, equals(legacyReleaseInclude));
+ }, overrides: <Type, Generator>{
+ FileSystem: () => fileSystem,
+ ProcessManager: () => FakeProcessManager.any(),
+ });
});
group('Update xcconfig', () {