fluttercandies/flutter_wechat_assets_picker
58.4
Adequate · 21 October 2026
12k
lines of production code
Dart
primary language
1
measurement over time
What this system is
This system is a Flutter library that provides a customizable asset picker for selecting images, videos, audio, and live photos across multiple platforms. It offers a flexible architecture allowing developers to implement custom UI layouts, handle drag-to-select interactions, and manage media previews through dedicated builders. The library supports internationalization, theming, and various selection modes, including single and multi-asset picking with camera integration.
How it got here
2020 — Architecture refactoring and platform expansion
17 changes.
The project underwent a significant architectural overhaul to support generic asset types, paginated loading, and extensive UI customization through builder delegates. This period also saw the modernization of the codebase with updated dependencies, the introduction of drag-to-select functionality, and the expansion of the example application to include macOS support and comprehensive localization.
2021–2023 — example app enhancements and test coverage
5 changes.
This period focused on expanding the example application with new custom asset picker implementations, widget components, and internationalization support for English and Chinese. Concurrently, a comprehensive test suite was added to verify core configuration, delegates, and provider behaviors.
Features
Add English and Chinese localization for the example app
The example app now supports internationalization with English and Chinese translations. This change introduces \app\_en.arb\ and \app\_zh.arb\ source files containing UI strings for the picker demos, and generates the corresponding \AppLocalizations\ classes and delegates in \example/lib/l10n/gen/\. Users can now switch the example app's language between English and Chinese, covering all navigation labels, picker descriptions, and custom picker UI text.
example/lib/l10n · high confidence
Add macOS example app
The example project now includes a native macOS target, allowing users to build and run the Wechat Assets Picker Example on macOS. This adds the full Xcode project structure (Runner.xcodeproj), including the AppDelegate and MainFlutterWindow Swift files, macOS-specific entitlements for sandboxing and network access, and the necessary Flutter configuration files to integrate the plugin on the desktop platform.
example/macos · high confidence
Introduce dedicated builders for audio, video, and image previews
The library now uses specific widget builders for each media type in the preview viewer. A new \AudioPageBuilder\ handles audio playback with play/pause controls and duration indicators. The \VideoPageBuilder\ manages video playback, including platform-specific controller initialization (using \contentUri\ on Android) and autoplay logic. The \ImagePageBuilder\ supports image viewing with gesture scaling and integrates Live Photo playback when enabled. Additionally, \AssetEntityGridItemBuilder\ provides a consistent grid item display with loading and failure states, while \FadeImageBuilder\ adds a subtle fade-in animation to image assets.
lib/src/widget/builder · high confidence
Introduce drag-to-select feature for asset grids
Users can now select multiple assets by dragging their finger across the asset grid. This new capability, implemented via the \AssetGridDragSelectionCoordinator\ in the delegates layer, automatically scrolls the grid when the drag reaches the screen edges and toggles the selection state of assets within the dragged area. The feature is controlled by the \dragToSelect\ configuration option and is automatically disabled in single-asset pick mode to prevent accidental changes.
lib/src/delegates · high confidence
New custom picker examples for directory files, Instagram-style, and multi-tab layouts
The example app now includes three new custom picker implementations in the \customs/pickers\ directory: \DirectoryFileAssetPicker\ for selecting local files via the file system, \InstaAssetPicker\ demonstrating an Instagram-inspired UI with a collapsible viewer, and \MultiTabAssetPicker\ allowing users to select assets across separate tabs for images and videos. These examples showcase advanced customization patterns using specific delegates and providers to tailor the asset picker's appearance and behavior.
example/lib/customs/pickers · high confidence
New example constants for pick methods and extensions
The example app now includes a dedicated constants directory with new files defining reusable pick method configurations and utility extensions. \picker\_method.dart\ introduces a \PickMethod\ class with factory constructors for common, image, video, audio, and live-photo picking, as well as a camera integration that injects a special item into the picker UI. \custom\_pick\_method.dart\ provides a \CustomPickMethod\ class for defining custom pick actions, while \extensions.dart\ adds helper extensions for localization access, brightness checking, and color swatch generation to simplify example code.
example/lib/constants · high confidence
New example page for custom asset picker implementations
The example app now includes a dedicated 'Custom Pickers' page that demonstrates how to integrate and switch between different asset picker layouts. This page lists three specific custom implementations: a directory and file picker, a multi-tab asset picker, and an Instagram-style layout picker, allowing users to see these customization patterns in action within the example app.
example/lib/customs · high confidence
New example widget components for asset display and method selection
The example app now includes three new widget files in the \example/lib/widgets\ directory: \AssetWidgetBuilder\ renders previews for audio, image, and video assets using a switch pattern; \MethodListView\ displays a scrollable list of picker methods with a visible scrollbar; and \SelectedAssetsListView\ manages the horizontal list of selected assets, allowing users to view details and remove items.
example/lib/widgets · high confidence
Behavioural changes
Android example app migrated to Kotlin and Flutter embedding v2
The Android example application has been updated to use Kotlin for its entry point (MainActivity) and added a Glide module configuration. The MainActivity now extends FlutterActivity, indicating a migration to the Flutter embedding v2 Android embedding system, and the new ExampleAppGlideModule configures the Glide image loading library for the example app.
example/android/app/src/main/kotlin · high confidence
Example app configuration and scaffolding updates
The example application has been updated with new configuration files to support localization and improved linting. An l10n.yaml file has been added to configure the app's localization setup, including the ARB directory and output class. Additionally, an analysis\_options.yaml file has been introduced to include shared linting rules and exclude generated localization files, while also disabling the use\_build\_context\_synchronously lint rule. A .gitignore file has been added to exclude common Flutter/Dart build artifacts and IDE-specific files, and a .metadata file has been created to track Flutter project properties and migration state.
example · high confidence
New example app structure with dedicated asset picker pages
The example application has been restructured into a new multi-page layout. A splash screen now initializes the app version before navigating to a home page that uses a PageView to switch between three distinct sections: MultiAssetsPage, SingleAssetPage, and CustomPickersPage. The MultiAssetsPage demonstrates a wide range of picking capabilities including common, image, video, audio, live photo, camera, and WeChat Moment modes, as well as features like custom themes, filter options, and scroll offset preservation. The SingleAssetPage focuses on single-selection scenarios with similar method variety but a limit of one asset. A shared ExamplePageMixin handles common state management for selected assets and method selection, while localization support is integrated throughout the UI.
example/lib/pages · high confidence
New example app with localization, theming, and logging
The example application has been replaced with a new implementation that supports internationalization via generated localizations, applies a consistent green theme for both light and dark modes, and enables debug logging for the underlying photo manager library. It also configures the system UI overlay and removes the overscroll glow effect for a smoother scrolling experience.
example/lib · high confidence
Provider architecture refactored to support generic assets and paging
The asset picker provider system has been refactored to support generic asset and path types, replacing the previous concrete \AssetEntity\-based implementation. The main \AssetPickerProvider\ is now an abstract generic class that manages \Path\ and \Asset\ types, introducing support for paginated asset loading via a new \pageSize\ parameter and exposing \SortPathDelegate\ for customizable sorting. The internal selection storage has shifted from \Set\ to \List\ to maintain order, and the custom \AssetEntityImageProvider\ has been removed in favor of standard Flutter image handling. Additionally, the viewer provider now uses generic \Asset\ types and enforces selection limits more strictly, while the provider lifecycle includes a \mounted\ check to prevent errors after disposal.
lib/src/provider · high confidence
Reconstructed iOS example project for WeChat Assets Picker
The iOS native files for the example app have been completely regenerated to align with modern Flutter standards. This update introduces a new Xcode project structure, sets the minimum deployment target to iOS 13.0, and configures CocoaPods for dependency management. It also includes necessary privacy permission descriptions for the camera, microphone, and photo library, ensuring the example app functions correctly on current iOS versions.
example/ios · high confidence
Refactor constants and scroll physics for better customization
The constants module has been restructured to support more flexible configuration and improved user experience. A new \AssetPickerConfig\ class centralizes picker settings, introducing options to disable asset previews (\SpecialPickerType.noPreview\), control Live Photo functionality, and customize path sorting via \SortPathDelegate\ and \sortPathsByModifiedDate\. The previous \Screens\ and \C\ (theme color) constants have been removed in favor of more explicit configuration. Additionally, scroll physics have been refined: \CustomBouncingScrollPhysics\ and \CustomClampingScrollPhysics\ now use a higher stiffness (400.0) for a tighter spring effect, and the singleton pattern for text and sort delegates has been updated to allow static overrides.
lib/src/constants · high confidence
Refactored picker architecture to use delegates and custom page routes
The picker's internal structure has been reorganized to support greater customization and cleaner separation of concerns. The previous \FixedAppBar\ and \PlatformProgressIndicator\ widgets have been removed and replaced with a new \AssetPickerAppBar\ that supports features like blur effects and custom bottom bars, alongside a new \AssetPickerPageRoute\ that provides configurable slide and fade transitions. The core \AssetPicker\ and \AssetPickerViewer\ widgets now rely on builder delegates (\AssetPickerBuilderDelegate\ and \AssetPickerViewerBuilderDelegate\) rather than direct provider injection, allowing users to override specific behaviors and layouts while the static entry points (\pickAssets\, \pushToViewer\) have been updated to accept configuration objects and route builders.
lib/src/widget · high confidence
Repository governance and documentation overhaul
The project has transitioned its licensing from MIT to Apache License 2.0, updated its README files with comprehensive documentation and badges, and standardized its development environment by switching to \flutter\_lints\ for analysis and configuring \.all-contributorsrc\ to automatically track and display community contributors.
(repo-wide) · high confidence
Restructured public API exports and added builder entry point
The library's public API surface has been reorganized to improve modularity and customization. A new \builder.dart\ entry point is now available, exporting specific page builders for assets (grid, audio, image, video). The main \wechat\_assets\_picker.dart\ file now explicitly re-exports core components from the \photo\_manager\ and \photo\_manager\_image\_provider\ packages, alongside internal constants, delegates, models (including \PathWrapper\ and \SpecialItem\), and widget components like the app bar and page route. This change exposes more granular control over the picker's UI and data handling capabilities.
lib · high confidence
Test coverage
Added test suite for asset picker configuration, delegates, and providers
Added new test files (\config\_test.dart\, \delegates\_test.dart\, \providers\_test.dart\, \widget\_test.dart\) and test utilities (\test\_utils.dart\) to verify core asset picker behaviors. These tests cover the \enableLivePhoto\ configuration flag, locale-based text delegate resolution, path sorting logic, provider disposal and asset selection state management, and the visibility of the confirm button under various preview and selection modes.
test · high confidence
Dependencies
Upgrade Gradle wrapper to version 8.14.3
The Android example project now uses Gradle 8.14.3 for building, replacing the previous version. This ensures the build environment is up to date with the latest Gradle release, which may include performance improvements and bug fixes.
example/android/gradle · high confidence
Upgrade to Flutter 3.27 and modernize dependencies
The example app and the main library have been updated to require Dart 3.6 and Flutter 3.27, dropping support for older SDK versions. The library's dependency on \photo\_manager\ has been upgraded to version 3.5.0, and \extended\_image\ is now constrained to versions 8.3.0 through 10.x. Additionally, the example project has been migrated to Kotlin DSL (Gradle Kotlin scripts) for Android configuration and updated to use Android Gradle Plugin 8.13.0 and Kotlin 2.2.0.
(dependencies) · high confidence
Housekeeping
Add Android example .gitignore
The Android example project now includes a .gitignore file to exclude common build artifacts, Gradle caches, and generated files from version control.
example/android · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 72 → 58 (-13.3)
- Rubric changed (rubric-2026.10.1 → rubric-2026.10.5) — scores are not directly comparable.
Lenses
- Code Health 100 → 94 (-5.9)
- Architecture 99 → 97 (-2.1)
- Maturity 59 → 41 (-18.1)
- Readiness 74 → 66 (-8.3)
- Security 85 → 85 (+0.0)
- Performance 70 (new)
New (61)
- AssetPickerAppBar.build (cognitive 19) (lib/src/widget/asset_picker_app_bar.dart)
- ClassTooLong: DefaultAssetPickerViewerBuilderDelegate (lib/src/delegates/asset_picker_viewer_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.assetGridItemBuilder (cognitive 18) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.assetGridItemBuilder (cyclomatic 18) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.assetsGridBuilder (cognitive 19) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.assetsGridBuilder (cyclomatic 19) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.onAssetsChanged (cognitive 45) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.onAssetsChanged (cyclomatic 27) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.viewAsset (cognitive 34) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerBuilderDelegate.viewAsset (cyclomatic 23) (lib/src/delegates/asset_picker_builder_delegate.dart)
- DefaultAssetPickerViewerBuilderDelegate.confirmButton (cognitive 19) (lib/src/delegates/asset_picker_viewer_builder_delegate.dart)
- DefaultAssetPickerViewerBuilderDelegate.confirmButton (cyclomatic 19) (lib/src/delegates/asset_picker_viewer_builder_delegate.dart)
- Duplicated block (10 lines × 2) (example/lib/customs/pickers/multi_tabs_assets_picker.dart)
- Duplicated block (11 lines × 2) (example/lib/customs/pickers/multi_tabs_assets_picker.dart)
- Duplicated block (12–13 lines × 3) (example/lib/customs/pickers/directory_file_asset_picker.dart)
- Duplicated block (13 lines × 2) (example/lib/customs/pickers/directory_file_asset_picker.dart)
- Duplicated block (13 lines × 2) (example/lib/customs/pickers/insta_asset_picker.dart)
- Duplicated block (14 lines × 2) (example/lib/customs/pickers/directory_file_asset_picker.dart)
- Duplicated block (15 lines × 2) (example/lib/customs/custom_picker_page.dart)
- Duplicated block (16 lines × 2) (example/lib/customs/pickers/directory_file_asset_picker.dart)
- …and 41 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fluttercandies/flutter_wechat_assets_picker was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 460a9076696b8a0ab8f8e67d3ce8f29ca83799f3 — the exact code this score is about.
- Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.1+preprod-05382052455d.