fayeed / flutter_mentions

A simple flutter input widget to add @ mentions functionality to your app
MIT License
107 stars 122 forks source link

Not able to use flutter_mentions 1.0.1. Error: No named parameter with the name 'autofillHints'. #16

Closed nirajjoshi closed 4 years ago

nirajjoshi commented 4 years ago

@fayeed , @erjanmx [

Screenshot 2020-10-02 at 4 09 15 PM

](url) I have added flutter_mentions as a dependency to my pub spec file like:

dependencies: flutter: sdk: flutter flutter_mentions: ^1.0.1

Also followed instructions like wrapping MaterialApp under Portal like:

return Portal( child: MaterialApp( .... ) );

While running the app I am getting below compile time error:

Compiler message: ../../SourceCode/FlutterSetup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mentions-1.0.1/lib/src/mention_view.dart:425:17: Error: No named parameter with the name 'autofillHints'. autofillHints: widget.autofillHints, ^^^^^^^^^^^^^ ../../SourceCode/FlutterSetup/flutter/packages/flutter/lib/src/material/text_field.dart:304:9: Context: Found this candidate, but the arguments don't match. const TextField({ ^^^^^^^^^

Also tried to download example app provided here at https://github.com/fayeed/flutter_mentions but it's also not running & throwing same compile time error mentioned able.

fayeed commented 4 years ago

@nirajjoshi Not sure what is the problem here, I am using this package in production and hadn't seen see this issue before. Can you tell me whats your flutter SDK version?

nirajjoshi commented 4 years ago

@nirajjoshi Not sure what is the problem here, I am using this package in production and hadn't seen see this issue before. Can you tell me whats your flutter SDK version?

@fayeed : flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G73, locale en-GB)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 11.7) [✓] Android Studio (version 4.0) [✓] Connected device (2 available)

• No issues found!

fayeed commented 4 years ago

Maybe you could try updating your Flutter SDK

nirajjoshi commented 4 years ago

Maybe you could try updating your Flutter SDK

Thanks for your quick feedback but can't update flutter version. Upgrading to new version is causing lot's of issues in other dependencies in our project which is huge & using plenty of dependencies.

Flutter version v1.17.5 is stable & not that old. Shouldn't flutter_mentions work well with stable flutter v1.17.5? Can you please check the above error by switching to above flutter version?

It would be great help to us & many others who are still using flutter v1.17.5.

Looking forward.

fayeed commented 4 years ago

@nirajjoshi Yeah so basically they added autofillHints in 1.80.0 I think & that might be the issue.

fayeed commented 4 years ago

As for the fix, I won't be updating the package to fix this so now you have two options:

  1. Update to the latest Flutter SDK.
  2. Fork this repo & remove that property and start using it using your git URL.
nirajjoshi commented 4 years ago

As for the fix, I won't be updating the package to fix this so now you have two options:

  1. Update to the latest Flutter SDK.
  2. Fork this repo & remove that property and start using it using your git URL.

Thanks @fayeed for help. That makes sense. Closing the issue.