Skip to content

Fix Resolve Set<dynamic> type mismatch on Select All#1

Open
Khip01 wants to merge 1 commit intoekyaaa:mainfrom
Khip01:fix/select-all-type-error
Open

Fix Resolve Set<dynamic> type mismatch on Select All#1
Khip01 wants to merge 1 commit intoekyaaa:mainfrom
Khip01:fix/select-all-type-error

Conversation

@Khip01
Copy link
Copy Markdown

@Khip01 Khip01 commented May 5, 2026

Issue

Clicking Select All in StepCommitList is unresponsive. A background exception is thrown because the provider expects a Set<String>, but the payload is inferred as Set<dynamic>.

Error Log

══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
The following _TypeError was thrown while handling a gesture:
type '_Set<dynamic>' is not a subtype of type 'Set<String>'

Error Preview

Screencast_20260505_233133

Solution

Added explicit typing <List<GitCommit>> to the commitsAsync parameter in _buildHeaderBar. This allows Dart to correctly infer the type, ensuring .toSet() returns a Set<String>.

Code Changes

Before:

  Widget _buildHeaderBar(
    // ...
    AsyncValue commitsAsync, // Missing type definition
  ) {

After:

  Widget _buildHeaderBar(
    // ...
    AsyncValue<List<GitCommit>> commitsAsync, // Type explicitly defined
  ) {

Fixed Preview

Screencast_20260505_234912

Testing Device

  • OS: Linux | openSUSE Leap 16.0 (KDE Plasma 6.4.2 / Wayland)

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.

1 participant