Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 14, 2025

  • Analyze the bug report and understand the issue
  • Locate the problematic code in asset_picker_builder_delegate.dart line 1084
  • Identify the root cause: accessing .first on potentially empty paths list
  • Fix the issue by adding safety check for empty paths
  • Run existing tests to ensure no regression (all 13 tests passed)
  • Run flutter analyze (no issues found)
  • Run code review (no issues found)
  • Run CodeQL security check (no issues found)
  • Add changelog entry
Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Bad state: No element</issue_title>
<issue_description>Describe the bug
我们在Firebase上看到了使用了 wechat_assets_picker: 9.7.0 版本产生的一些Bug。而之前的 wechat_assets_picker: 9.0.0 并没有。

How to reproduce
暂无复现步骤

Expected behavior
期望不要发生此类异常

Screenshots (If contains)

Image

Version information

  • Device: 如图
  • OS: Android 15+
  • Package Version: v9.7.0
  • Flutter Version: 3.29.3
Image

Additional context

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix bad state issue in wechat_assets_picker Fix crash on empty paths in onAssetsChanged Dec 14, 2025
Copilot AI requested a review from AlexV525 December 14, 2025 17:18
@AlexV525
Copy link
Member

@copilot write changelog

Copy link
Contributor Author

Copilot AI commented Dec 14, 2025

@copilot write changelog

Added changelog entry in commit abacd02.

@AlexV525 AlexV525 marked this pull request as ready for review December 14, 2025 23:30
@AlexV525 AlexV525 requested a review from LeGoffMael as a code owner December 14, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Bad state: No element

2 participants