cancelButton property
Use this to add cancel button widget. To assign press event on non-clickable widgets like
Containter(), Text() etc.
Wrap you widget with
GestureDetector(
onTap: (){
}
child: widget,
)
or
InkWell(
onTap: (){
}
child: widget,
)
Implementation
Widget? cancelButton;