fayeed / flutter_mentions

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

NoSuchMethodError: the Method 'toLowerCase' was called on null #88

Open florian-sabonchi opened 2 years ago

florian-sabonchi commented 2 years ago

photo_2022-06-17_16-19-23

ebrahim2222 commented 2 years ago

did you solve it ??

Daliseiy commented 2 years ago

This error occurs when you fail to pass in display as a property in your data. When passing your data, you need to provide two required properties id & display both are String. Example -

data: [
        {
          "id": "61as61fsa",
          "display": "fayeedP",
          "photo": "https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg"
        },

      ],

Excluding id or display will cause an error which is what you are experiencing.