revert image cache patch

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-22 12:11:53 +08:00
parent c8187ad3a1
commit c4c4fd5f3d
49 changed files with 157 additions and 107 deletions

View File

@@ -12,32 +12,32 @@ index 30429ea5e02..79f727ab472 100644
/// Creates a widget that displays an [ImageStream] obtained from the network.
@@ -471,6 +472,7 @@ class Image extends StatefulWidget {
Map<String, String>? headers,
num? cacheWidth,
num? cacheHeight,
int? cacheWidth,
int? cacheHeight,
+ this.isPaused = true,
WebHtmlElementStrategy webHtmlElementStrategy = WebHtmlElementStrategy.never,
}) : image = ResizeImage.resizeIfNeeded(
cacheWidth,
@@ -540,6 +542,7 @@ class Image extends StatefulWidget {
this.filterQuality = FilterQuality.medium,
num? cacheWidth,
num? cacheHeight,
int? cacheWidth,
int? cacheHeight,
+ this.isPaused = true,
}) : // FileImage is not supported on Flutter Web therefore neither this method.
assert(
!kIsWeb,
@@ -703,6 +706,7 @@ class Image extends StatefulWidget {
this.filterQuality = FilterQuality.medium,
num? cacheWidth,
num? cacheHeight,
int? cacheWidth,
int? cacheHeight,
+ this.isPaused = true,
}) : image = ResizeImage.resizeIfNeeded(
cacheWidth,
cacheHeight,
@@ -765,6 +769,7 @@ class Image extends StatefulWidget {
this.filterQuality = FilterQuality.medium,
num? cacheWidth,
num? cacheHeight,
int? cacheWidth,
int? cacheHeight,
+ this.isPaused = true,
}) : image = ResizeImage.resizeIfNeeded(
cacheWidth,

View File

@@ -20,7 +20,7 @@ $LayoutBuilderPatch = "lib/scripts/layout_builder.patch"
# https://github.com/flutter/flutter/issues/56239
# ref https://github.com/flutter/flutter/pull/184549
$ImageCachePatch = "lib/scripts/image_cache.patch"
# $ImageCachePatch = "lib/scripts/image_cache.patch"
$ImageAnimPatch = "lib/scripts/image_anim.patch"
@@ -39,7 +39,7 @@ Set-Location $env:FLUTTER_ROOT
$picks = @()
$reverts = @()
$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch,
$NavigationBarPatch, $PaddingPatch, $ImageCachePatch, $ImageAnimPatch,
$NavigationBarPatch, $PaddingPatch, $ImageAnimPatch,
$LayoutBuilderPatch, $ScaleGesturePatch)
switch ($platform.ToLower()) {