saminsohag

Fixed the hittest essue of the ordered list

... ... @@ -236,7 +236,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex
),
);
}
child = GestureDetector(
child = InkWell(
onTap: () {
debugPrint("Hello world");
},
... ...
... ... @@ -394,4 +394,26 @@ class OrderedListRenderObject extends RenderProxyBox {
);
pt.paint(context.canvas, offset + _ptOffset);
}
@override
bool hitTestSelf(Offset position) {
return false;
}
@override
bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {
Offset offset = (child!.parentData as BoxParentData).offset;
return result.addWithPaintOffset(
offset: offset,
position: position,
hitTest: (result, newOffset) {
return child?.hitTest(result, position: newOffset) ?? false;
},
);
}
@override
bool hitTest(BoxHitTestResult result, {required Offset position}) {
return hitTestChildren(result, position: position);
}
}
... ...