fayeed / flutter_mentions

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

How to let the suggestion list on the center position? #10

Closed NeoLSN closed 4 years ago

NeoLSN commented 4 years ago

If there is any other UI aside, the portal will be tilting. Could you let the suggestion list always be on the screen center? image

fayeed commented 4 years ago

@NeoLSN Thanks for reporting the issue I will take a look.

fayeed commented 4 years ago

@NeoLSN Can you share the code I just tried reproducing this & everything works fine Simulator Screen Shot - iPhone X - 2020-09-28 at 11 52 18

NeoLSN commented 4 years ago

You need to add another UI on the left or right side of the FlutterMentions. I can't show you the code, but the layout looks like

Row(
  Flexible(FlutterMentions()),
  SendButton(),
)
fayeed commented 4 years ago

Yeah i did as you can see from the image there are two container one on the left and another on the right which both take about 20.0 width and everything works fine on my end.

NeoLSN commented 4 years ago

Yeah i did as you can see from the image there are two container one on the left and another on the right which both take about 20.0 width and everything works fine on my end.

Can you just do it on one side only?

fayeed commented 4 years ago

@NeoLSN so what I did is I have added two new properties called leading & trailing both are List<Widget>, this should do the trick.

fayeed commented 4 years ago

Also closing the issue.

NeoLSN commented 4 years ago

@fayeed What do you mean? You just show me a trick, but not solving the real issue. That's just means I can't add other UI aside FlutterMentions...

fayeed commented 4 years ago

@NeoLSN and what is the real issue?

NeoLSN commented 4 years ago

I want to add a button right on the FlutterMentions like bellow codes,

Row(
  children: [
   Flexible(FlutterMentions()),
  SendButton(),
  ]
)

But the suggestion list will be out of the screen. That's the issue.

fayeed commented 4 years ago

Yeah, and you can do that using the trailing widget.

edit: It's just a List of Widgets, that's it.

NeoLSN commented 4 years ago

OK, I see. Sorry, I forgot pull the new library.

fayeed commented 4 years ago

Also before commenting on implementation as just a "trick", please take a look at it and try using it.

NeoLSN commented 4 years ago

Also before commenting on implementation as just a "trick", please take a look at it and try using it.

Yeah, I apologize about this. And thanks your help.