0

i have the following column

 late  final TextEditingController controller = TextEditingController();
    Column(
    children:[
     GestureDetector(
         onTap: (){
          // 1- here How can i copy the emoji 
          // 2- add it to controller (locate it to the current location where text field cursor located )
         },
        child: Text('')
       ),
        TextField(
        controller: controller ,
        )
     ]
    )

1- here How can i copy the emoji

2- add it to controller (fitting it to the current location where text field cursor located )

Mohammed Hamdan
  • 1,006
  • 5
  • 23
  • Does this answer your question? [Flutter: How to insert text in middle of text field text](https://stackoverflow.com/questions/60057840/flutter-how-to-insert-text-in-middle-of-text-field-text) – Ivo Dec 08 '22 at 11:05

2 Answers2

0

Emoji Picker

You can use this library.

erkaneroglu
  • 198
  • 6
0

try this

 GestureDetector(
          onTap: () {
            String text = controller.text + '';
            setState(() {
              controller.value = TextEditingValue(
                  text: text,
                  selection: TextSelection(
                      baseOffset: text.length, extentOffset: text.length));
            });
          },
          child: Text('')),