Skip to content

Conversation

@Ayad-Ben-Saliem
Copy link

This PR introduces updates to modernize the package, including SDK bumps, API signature updates, and improved keyboard interaction logic. Crucially, it fixes a PlatformException that occurred on Flutter Windows applications running on Flutter versions > 3.29.

Key Changes

SDK Upgrades:

  • Bumped package SDK constraint to >=2.17.0.
  • Updated example project SDK constraint to >=3.0.0.

API Updates:

  • Updated chipBuilder and suggestionBuilder signatures to include an index parameter.
  • Added an onSubmit callback.
  • Updated constructors to use super.key and exposed TextCursorState.

Input & Keyboard Logic:

  • Updated TextInputClient implementation to support viewId and missing interface methods.
  • Implemented KeyboardListener for better handling of Backspace (chip deletion) and Tab (submit) keys.

Tests:

  • Updated test suites to accommodate the new builder signatures.◦

Manassa LTD. added 5 commits November 20, 2025 13:58
- Update `pubspec.yaml` SDK constraint to `>=2.17.0`.
- Update `TextInputClient` implementation to support `viewId` and add missing interface methods.
- Implement `KeyboardListener` for better Backspace (delete) and Tab (submit) key handling.
- Update `ChipsBuilder` signature to include `index` and refactor deletion logic.
- Expose `TextCursorState` and update constructors to use `super.key`.
@Ayad-Ben-Saliem
Copy link
Author

Update: Added Custom Submit Keys Support

I've pushed a couple of new commits to this branch to enhance how input submission is handled:

  • Custom Submit Keys: You can now pass a submitKeys list to ChipsInput. This allows defining which specific keys (e.g., Enter, Tab, Comma) should trigger the submission of a chip.
  • Default Tab Support: By default, LogicalKeyboardKey.tab is now included as a submit key, improving accessibility and keyboard navigation flow out of the box.

@Ayad-Ben-Saliem
Copy link
Author

Update: Support for Duplicate Chips

Added a new allowDuplication parameter to ChipsInput

  • allowDuplication: false (Default): Prevents the user from selecting the same chip multiple times.
  • allowDuplication: true: Allows duplicate chips to be added.

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