From 23826d1867b48181ebfcd4df5166ef5682957d81 Mon Sep 17 00:00:00 2001 From: Guillaume LE MARTRET Date: Fri, 20 Dec 2024 16:59:39 +0100 Subject: [PATCH 1/3] feat: add InterlacedProgress handling for progressive jpeg --- cached_network_image/lib/cached_network_image.dart | 2 +- .../lib/src/image_provider/_image_loader.dart | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cached_network_image/lib/cached_network_image.dart b/cached_network_image/lib/cached_network_image.dart index 99375aaaa..2062557ab 100644 --- a/cached_network_image/lib/cached_network_image.dart +++ b/cached_network_image/lib/cached_network_image.dart @@ -3,7 +3,7 @@ library cached_network_image; export 'package:flutter_cache_manager/flutter_cache_manager.dart' - show CacheManagerLogLevel, DownloadProgress; + show CacheManagerLogLevel, DownloadProgress, InterlacedProgress; export 'src/cached_image_widget.dart'; export 'src/image_provider/cached_network_image_provider.dart'; diff --git a/cached_network_image/lib/src/image_provider/_image_loader.dart b/cached_network_image/lib/src/image_provider/_image_loader.dart index 538e6bf4a..be2539652 100644 --- a/cached_network_image/lib/src/image_provider/_image_loader.dart +++ b/cached_network_image/lib/src/image_provider/_image_loader.dart @@ -120,6 +120,10 @@ class ImageLoader implements platform.ImageLoader { ), ); } + if (result is InterlacedProgress) { + final decoded = await decode(result.data); + yield decoded; + } if (result is FileInfo) { final file = result.file; final bytes = await file.readAsBytes(); From 16abf2151478d76af5ab33da3607377d0d9375b6 Mon Sep 17 00:00:00 2001 From: Guillaume LE MARTRET Date: Mon, 21 Sep 2026 15:33:45 +0200 Subject: [PATCH 2/3] chore: update dependencies and add progressive image loading example - Updated flutter_cache_manager dependency to version 3.4.5 across multiple pubspec.yaml files. - Added dependency overrides for flutter_cache_manager and related packages to point to feature branches. - Introduced a new ProgressiveContent widget in the example app to demonstrate progressive image loading. - Updated .gitignore files to include additional build artifacts. - Made minor formatting adjustments in pubspec.yaml files for consistency. --- cached_network_image/example/.gitignore | 2 + .../ios/Runner.xcodeproj/project.pbxproj | 127 +++++++++++++++++- .../xcshareddata/xcschemes/Runner.xcscheme | 19 +++ .../contents.xcworkspacedata | 3 + .../example/ios/Runner/AppDelegate.swift | 2 +- .../example/ios/Runner/Info.plist | 8 +- cached_network_image/example/lib/main.dart | 26 ++++ .../linux/flutter/generated_plugins.cmake | 1 - .../Flutter/GeneratedPluginRegistrant.swift | 2 + cached_network_image/example/pubspec.yaml | 2 +- .../windows/flutter/generated_plugins.cmake | 1 - cached_network_image/pubspec.yaml | 25 +++- .../pubspec.yaml | 15 ++- cached_network_image_web/pubspec.yaml | 20 ++- 14 files changed, 227 insertions(+), 26 deletions(-) diff --git a/cached_network_image/example/.gitignore b/cached_network_image/example/.gitignore index 24476c5d1..6c319542b 100644 --- a/cached_network_image/example/.gitignore +++ b/cached_network_image/example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/cached_network_image/example/ios/Runner.xcodeproj/project.pbxproj b/cached_network_image/example/ios/Runner.xcodeproj/project.pbxproj index 506236fee..6d273f9bd 100644 --- a/cached_network_image/example/ios/Runner.xcodeproj/project.pbxproj +++ b/cached_network_image/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,9 +8,12 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 322281B8220378BAE5FFFBBA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 624A9B6F8F051F9F20310EDC /* Pods_Runner.framework */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 7A1DD5CE8B300906864F359E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DB49813FE16B23847419FE1 /* Pods_RunnerTests.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -40,11 +43,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1288DCBCEE0C2980FA42A4C3 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 18DF955D4A0C6A15B761E2F9 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 282F0780D28116E36EF05AD6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 4BDC7F58FCD62CC2CD879CE3 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 4DB49813FE16B23847419FE1 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 624A9B6F8F051F9F20310EDC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -55,13 +64,25 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A35D94E9BFB43EF47CF7BF18 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + AE47235CF31EAEAE0057F59E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 3E05196087AFEBA2C049A091 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A1DD5CE8B300906864F359E /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + 322281B8220378BAE5FFFBBA /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -76,6 +97,15 @@ path = RunnerTests; sourceTree = ""; }; + 56CD5116BADD79D56E61EB36 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 624A9B6F8F051F9F20310EDC /* Pods_Runner.framework */, + 4DB49813FE16B23847419FE1 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -94,6 +124,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, + D200C6173C3CC5A8FB50237D /* Pods */, + 56CD5116BADD79D56E61EB36 /* Frameworks */, ); sourceTree = ""; }; @@ -121,6 +153,19 @@ path = Runner; sourceTree = ""; }; + D200C6173C3CC5A8FB50237D /* Pods */ = { + isa = PBXGroup; + children = ( + AE47235CF31EAEAE0057F59E /* Pods-Runner.debug.xcconfig */, + A35D94E9BFB43EF47CF7BF18 /* Pods-Runner.release.xcconfig */, + 282F0780D28116E36EF05AD6 /* Pods-Runner.profile.xcconfig */, + 4BDC7F58FCD62CC2CD879CE3 /* Pods-RunnerTests.debug.xcconfig */, + 1288DCBCEE0C2980FA42A4C3 /* Pods-RunnerTests.release.xcconfig */, + 18DF955D4A0C6A15B761E2F9 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -128,8 +173,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + FCD8EDC86F0E84D54AC9F6AD /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, + 3E05196087AFEBA2C049A091 /* Frameworks */, ); buildRules = ( ); @@ -145,6 +192,7 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 252AB01F2B72930973296770 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, @@ -157,6 +205,9 @@ dependencies = ( ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -190,6 +241,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -222,6 +276,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 252AB01F2B72930973296770 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -253,6 +329,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + FCD8EDC86F0E84D54AC9F6AD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -362,14 +460,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 6UEL98K25V; + DEVELOPMENT_TEAM = R4LTQ8TWCL; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleadadfsadsfawf; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -379,6 +477,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4BDC7F58FCD62CC2CD879CE3 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -396,6 +495,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1288DCBCEE0C2980FA42A4C3 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -411,6 +511,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 18DF955D4A0C6A15B761E2F9 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -542,14 +643,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 6UEL98K25V; + DEVELOPMENT_TEAM = R4LTQ8TWCL; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleadadfsadsfawf; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -565,14 +666,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 6UEL98K25V; + DEVELOPMENT_TEAM = R4LTQ8TWCL; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleadadfsadsfawf; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -614,6 +715,20 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/cached_network_image/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/cached_network_image/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 8e3ca5dfe..d795332e1 100644 --- a/cached_network_image/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/cached_network_image/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + diff --git a/cached_network_image/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/cached_network_image/example/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16e..21a3cc14c 100644 --- a/cached_network_image/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/cached_network_image/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/cached_network_image/example/ios/Runner/AppDelegate.swift b/cached_network_image/example/ios/Runner/AppDelegate.swift index 9074fee92..626664468 100644 --- a/cached_network_image/example/ios/Runner/AppDelegate.swift +++ b/cached_network_image/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Flutter import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/cached_network_image/example/ios/Runner/Info.plist b/cached_network_image/example/ios/Runner/Info.plist index 5458fc418..f15383a85 100644 --- a/cached_network_image/example/ios/Runner/Info.plist +++ b/cached_network_image/example/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -24,6 +26,8 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -41,9 +45,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/cached_network_image/example/lib/main.dart b/cached_network_image/example/lib/main.dart index 57af30998..4120adf8d 100644 --- a/cached_network_image/example/lib/main.dart +++ b/cached_network_image/example/lib/main.dart @@ -17,6 +17,7 @@ void main() { BasicContent.createPage(), ListContent.createPage(), GridContent.createPage(), + ProgressiveContent.createPage(), ], ), ); @@ -217,3 +218,28 @@ class GridContent extends StatelessWidget { return const Center(child: Icon(Icons.error)); } } + +/// Demonstrates a Progressive image loading +class ProgressiveContent extends StatelessWidget { + const ProgressiveContent({super.key}); + + @override + Widget build(BuildContext context) { + return CachedNetworkImage( + imageUrl: + 'https://images.pexels.com/photos/1624496/pexels-photo-1624496.jpeg?${DateTime.now().millisecondsSinceEpoch}', + // imageUrl: + // 'https://www.hoalen.com/medias/home/desktop/596-1734529993.webp?${DateTime.now().millisecondsSinceEpoch}', + // placeholder: (BuildContext context, String url) => Container( + // width: 320, + // height: 240, + // color: Colors.purple, + // ), + ); + } + + static ExamplePage createPage() { + return ExamplePage( + Icons.downloading_rounded, (context) => const ProgressiveContent()); + } +} diff --git a/cached_network_image/example/linux/flutter/generated_plugins.cmake b/cached_network_image/example/linux/flutter/generated_plugins.cmake index df8d2f723..f16b4c342 100644 --- a/cached_network_image/example/linux/flutter/generated_plugins.cmake +++ b/cached_network_image/example/linux/flutter/generated_plugins.cmake @@ -7,7 +7,6 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST - jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/cached_network_image/example/macos/Flutter/GeneratedPluginRegistrant.swift b/cached_network_image/example/macos/Flutter/GeneratedPluginRegistrant.swift index 645e27da5..368554e06 100644 --- a/cached_network_image/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/cached_network_image/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,10 +5,12 @@ import FlutterMacOS import Foundation +import path_provider_foundation import sqflite_darwin import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/cached_network_image/example/pubspec.yaml b/cached_network_image/example/pubspec.yaml index a22af3e36..ef952e6ce 100644 --- a/cached_network_image/example/pubspec.yaml +++ b/cached_network_image/example/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 environment: sdk: ^3.0.0 - flutter: '>=3.10.0' + flutter: ">=3.10.0" dependencies: baseflow_plugin_template: ^2.2.0 diff --git a/cached_network_image/example/windows/flutter/generated_plugins.cmake b/cached_network_image/example/windows/flutter/generated_plugins.cmake index a962892f6..88b22e5c7 100644 --- a/cached_network_image/example/windows/flutter/generated_plugins.cmake +++ b/cached_network_image/example/windows/flutter/generated_plugins.cmake @@ -7,7 +7,6 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST - jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/cached_network_image/pubspec.yaml b/cached_network_image/pubspec.yaml index 37c8d7306..4c3edf0bf 100644 --- a/cached_network_image/pubspec.yaml +++ b/cached_network_image/pubspec.yaml @@ -10,20 +10,37 @@ version: 4.0.1 environment: sdk: ^3.12.0 - flutter: '>=3.44.0' + flutter: ">=3.44.0" dependencies: cached_network_image_platform_interface: ^5.0.0 cached_network_image_web: ^2.0.0 flutter: sdk: flutter - flutter_cache_manager: ^3.4.1 + flutter_cache_manager: ^3.4.5 + material_ui: ^1.0.0 octo_image: ^2.1.0 - material_ui: ^1.0.0 dev_dependencies: - file: '>=7.0.0 <8.0.0' + file: ">=7.0.0 <8.0.0" flutter_lints: ^4.0.0 flutter_test: sdk: flutter mocktail: ^1.0.4 + +dependency_overrides: + flutter_cache_manager: + git: + url: git@github.com:glemartret/flutter_cache_manager.git + path: flutter_cache_manager + ref: feature/progressive + cached_network_image_platform_interface: + git: + url: git@github.com:glemartret/flutter_cached_network_image_platform_interface.git + path: cached_network_image_platform_interface + ref: feature/progressive + cached_network_image_web: + git: + url: git@github.com:glemartret/flutter_cached_network_image_web.git + path: cached_network_image_web + ref: feature/progressive diff --git a/cached_network_image_platform_interface/pubspec.yaml b/cached_network_image_platform_interface/pubspec.yaml index e1b323e39..3f1072209 100644 --- a/cached_network_image_platform_interface/pubspec.yaml +++ b/cached_network_image_platform_interface/pubspec.yaml @@ -5,16 +5,23 @@ homepage: https://github.com/Baseflow/flutter_cached_network_image environment: sdk: ^3.12.0 - flutter: '>=3.44.0' + flutter: ">=3.44.0" dependencies: flutter: sdk: flutter - flutter_cache_manager: ^3.4.1 - + flutter_cache_manager: ^3.4.5 material_ui: ^1.0.0 + dev_dependencies: - file: '>=7.0.0 <8.0.0' + file: ">=7.0.0 <8.0.0" flutter_lints: ^4.0.0 flutter_test: sdk: flutter + +dependency_overrides: + flutter_cache_manager: + git: + url: git@github.com:glemartret/flutter_cache_manager.git + path: flutter_cache_manager + ref: feature/progressive diff --git a/cached_network_image_web/pubspec.yaml b/cached_network_image_web/pubspec.yaml index e8ec7eb52..ede236941 100644 --- a/cached_network_image_web/pubspec.yaml +++ b/cached_network_image_web/pubspec.yaml @@ -5,18 +5,30 @@ homepage: https://github.com/Baseflow/flutter_cached_network_image environment: sdk: ^3.12.0 - flutter: '>=3.44.0' + flutter: ">=3.44.0" dependencies: cached_network_image_platform_interface: ^5.0.0 flutter: sdk: flutter - flutter_cache_manager: ^3.4.1 + flutter_cache_manager: ^3.4.5 + material_ui: ^1.0.0 web: ^1.0.0 - material_ui: ^1.0.0 dev_dependencies: - file: '>=7.0.0 <8.0.0' + file: ">=7.0.0 <8.0.0" flutter_lints: ^4.0.0 flutter_test: sdk: flutter + +dependency_overrides: + flutter_cache_manager: + git: + url: git@github.com:glemartret/flutter_cache_manager.git + path: flutter_cache_manager + ref: feature/progressive + cached_network_image_platform_interface: + git: + url: git@github.com:glemartret/flutter_cached_network_image_platform_interface.git + path: cached_network_image_platform_interface + ref: feature/progressive From 1bfd2d8b00a45ba3bceab0edc58d9fa079c4cb16 Mon Sep 17 00:00:00 2001 From: Guillaume LE MARTRET Date: Mon, 21 Sep 2026 15:45:34 +0200 Subject: [PATCH 3/3] chore: update git URLs in pubspec.yaml files for cached_network_image packages - Changed the git URLs for cached_network_image_platform_interface and cached_network_image_web to point to the main cached_network_image repository. - Ensured consistency across multiple pubspec.yaml files. --- cached_network_image/pubspec.yaml | 4 ++-- cached_network_image_web/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cached_network_image/pubspec.yaml b/cached_network_image/pubspec.yaml index 4c3edf0bf..360e125f3 100644 --- a/cached_network_image/pubspec.yaml +++ b/cached_network_image/pubspec.yaml @@ -36,11 +36,11 @@ dependency_overrides: ref: feature/progressive cached_network_image_platform_interface: git: - url: git@github.com:glemartret/flutter_cached_network_image_platform_interface.git + url: git@github.com:glemartret/flutter_cached_network_image.git path: cached_network_image_platform_interface ref: feature/progressive cached_network_image_web: git: - url: git@github.com:glemartret/flutter_cached_network_image_web.git + url: git@github.com:glemartret/flutter_cached_network_image.git path: cached_network_image_web ref: feature/progressive diff --git a/cached_network_image_web/pubspec.yaml b/cached_network_image_web/pubspec.yaml index ede236941..496522db8 100644 --- a/cached_network_image_web/pubspec.yaml +++ b/cached_network_image_web/pubspec.yaml @@ -29,6 +29,6 @@ dependency_overrides: ref: feature/progressive cached_network_image_platform_interface: git: - url: git@github.com:glemartret/flutter_cached_network_image_platform_interface.git + url: git@github.com:glemartret/flutter_cached_network_image.git path: cached_network_image_platform_interface ref: feature/progressive