I'm trying to clear my TextField, here is what i do

```
IconButton(
      onPressed: (){
        FocusScope.of(context).requestFocus(new FocusNode());
        _searchFieldController.clear();
        setState(() {
          searchClicked = false;
        });
      },
      icon: Icon(Icons.close),
    );
  }

```

when i run it i get this error

> 
> I/flutter ( 4547): ══╡ EXCEPTION CAUGHT BY GESTURE
>  ╞═══════════════════════════════════════════════════════════════════
>  I/flutter ( 4547): The following assertion was thrown while handling a
>  gesture: I/flutter ( 4547): invalid text selection:
>  TextSelection(baseOffset: 6, extentOffset: 6, affinity: I/flutter (
>  4547): TextAffinity.upstream, isDirectional: false)
> 
> 
> 

and here is my the widget 

```
TextField(
                  onChanged: (text) {
                    if(text.length >= 4){
                      searchResult = productTemp.where((i) => i.productName.contains(text.toString())).toList();
                      _productController.sink.add(searchResult);
                    }else{
                      _productController.sink.add(productTemp);
                    }
                  },
                  focusNode: _focus,
                  controller: _searchFieldController,
                  style: TextStyle(fontSize: 15),
                  decoration: InputDecoration(
                      filled: true,
                      hintStyle:new TextStyle(color: Colors.grey[800],fontSize: 20),
                      fillColor: Colors.white70,
                      hintText: "Search",
                      suffixIcon: searchClicked  ? buildCancelIcon() : buildSearchIcon()
                  ),
                )

```