Is there an option to select the text written in TextFormField or TextField on double clicking the field in a Windows App made in Flutter?

Because currently it only works if the text is double clicked, whereas normally in windows application clicking anywhere in the text field selects the entire text written.

Solution 1: Kaushik Chandru

Wrap the textfield with an inkwell to provide a double tap. Then on double tap set the selection of the textfield

      _textController.selection = TextSelection(baseOffset:0, extentOffset: _textController.text.length);
  controller: _textController,

Solution 2: Amroun

Put your TextField inside GestureDetector

   onDoubleTap:() {
     if(_controller.text.isNotEmpty) {
       _controller.selection = TextSelection(baseOffset: 0, extentOffset:_controller.text.length);
   child: TextField(controller: _controller, ),