A flutter package for expand hit test area. Several default widgets are provided and can be easily customized
Usage
Default widget by extends InkWell
ExpandInkWell(
expandArea:const EdgeInsets.all(30),
onTap: () {
debugPrint("expand inkwell tap");
},
child: Container(color: Colors.red, height: 100, width: 100))
Default widget by extends GestureDetector
ExpandGestureDetector(
expandArea:const EdgeInsets.all(30),
onTap: () {
debugPrint("expand GestureDetector tap");
},
child: Container(color: Colors.red, height: 100, width: 100))
Custom
ExpandHitTestWidget(
expandArea:const EdgeInsets.all(30),
child: CupertinoButton(padding: EdgeInsets.zero,child: Container(color: Colors.red, height: 100, width: 100),
onPressed: () {
debugPrint("expand CupertinoButton tap");
}))
Need to go beyond the parent
ExpandHitTestScope(child: xxxxx)