Dn-a / flutter_tags

With flutter tags you can create selectable or input tags that automatically adapt to the screen width
https://pub.dartlang.org/packages/flutter_tags
MIT License
507 stars 127 forks source link

I want to add no matched tag when using suggestions #33

Closed hatano0x06 closed 4 years ago

hatano0x06 commented 4 years ago

I think this is very good package!!

I want to ask, why I can't add no matched tag when using suggestions? Is there are reason that you can't do?

I think, this "if" is prevent to do that https://github.com/Dn-a/flutter_tags/blob/master/lib/src/suggestions_textfield.dart#L135 and https://github.com/Dn-a/flutter_tags/blob/master/lib/src/suggestions_textfield.dart#L128 change to be

    if (_suggestions != null && _matches.length > 0) str = _matches.first;

thank you!

Dn-a commented 4 years ago

@hatano0x06 does the problem occur on the emulator?Android or IOS?what version of flutter are you using?

hatano0x06 commented 4 years ago

@Dn-a It happend at Android. It both happen in emulator and device.

I'll show result when I run flutter doctor.

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.10.11-pre.4, on Microsoft Windows [Version 10.0.18362.388], locale ja-JP)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.5)
[√] VS Code (version 1.38.1)
[√] Connected device (1 available)
Dn-a commented 4 years ago

@hatano0x06 update to the latest stable flutter version releases and retry

Dn-a commented 4 years ago

@hatano0x06 you solved?

hatano0x06 commented 4 years ago

@Dn-a Sorry, I take time to upgrade I upgrade to v1.9.1+hotfix.4 but have same problem

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.4, on Microsoft Windows [Version 10.0.18362.388], locale ja-JP)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.38.1)
[√] Connected device (1 available)
Dn-a commented 4 years ago

@hatano0x06 could you provide the source code and possibly even some screenshots?

hatano0x06 commented 4 years ago

@Dn-a I upload to my repository! https://github.com/hatano0x06/sample_of_flutter_tags

Dn-a commented 4 years ago

@hatano0x06 would you like to use a list of tags that block the insertion?

hatano0x06 commented 4 years ago

@Dn-a I my case, I want to allow users to add tags dyanamicly. In order to do so, it must able to add tags that do not appear in suggest. So, I don't want to block the insert. I want to insert tag freely

Dn-a commented 4 years ago

@hatano0x06 now it is clearer ... I did not foresee this possibility but I will insert a parameter in future releases.

hatano0x06 commented 4 years ago

@Dn-a thank you! I will waiting to see it!

Dn-a commented 4 years ago

@hatano0x06 since version 0.4.7 you can do it using the constraintSuggestion field. check and let me know