flutter-emoji icon indicating copy to clipboard operation
flutter-emoji copied to clipboard

how to detect a sentence is pure emoji or not?

Open lucasjinreal opened this issue 5 years ago β€’ 4 comments

is there any API to do:

parser.is_pure_emoji('ddf')

if is full emoji, then return yes, otherwise return false.

lucasjinreal avatar Feb 29 '20 12:02 lucasjinreal

'ddf' is a text. I don't understand what you want. Can you elaborate?

petehouston avatar Mar 01 '20 19:03 petehouston

Yes. I want detection if a text contains pure emoji or not. Such as:

πŸ˜€ 😁 πŸ˜‚ -> true πŸ˜€ 😁 ηš„θΏ˜ -> not πŸ˜€ 😁 fereπŸ˜‚ -> not fergπŸ˜€ 😁 πŸ˜‚ -> not

I want to do this is because I want detect if use's input is pure emoji or not, if pure emoji then I will enlarge all text say size as 99, so it will looks big just like facebook Messagers does, but if emoji with normal text, then just show normal.

Does it able to do this kind of detect?

lucasjinreal avatar Mar 03 '20 03:03 lucasjinreal

Yes, it is possible. But are you trying to capture text everytime user type to enlarge or only do once after user prompt the text?

petehouston avatar Mar 05 '20 03:03 petehouston

@petehouston You are right, this should consider efficiency. I simply want detect it once user press enter button, then I will decide how to show it (if pure emoji then txt size big, other normal). Rest time will not do this.

Will will do very fast to determine?

lucasjinreal avatar Mar 05 '20 06:03 lucasjinreal