Showing
2 changed files
with
23 additions
and
1 deletions
@@ -236,7 +236,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -236,7 +236,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
236 | ), | 236 | ), |
237 | ); | 237 | ); |
238 | } | 238 | } |
239 | - child = GestureDetector( | 239 | + child = InkWell( |
240 | onTap: () { | 240 | onTap: () { |
241 | debugPrint("Hello world"); | 241 | debugPrint("Hello world"); |
242 | }, | 242 | }, |
@@ -394,4 +394,26 @@ class OrderedListRenderObject extends RenderProxyBox { | @@ -394,4 +394,26 @@ class OrderedListRenderObject extends RenderProxyBox { | ||
394 | ); | 394 | ); |
395 | pt.paint(context.canvas, offset + _ptOffset); | 395 | pt.paint(context.canvas, offset + _ptOffset); |
396 | } | 396 | } |
397 | + | ||
398 | + @override | ||
399 | + bool hitTestSelf(Offset position) { | ||
400 | + return false; | ||
401 | + } | ||
402 | + | ||
403 | + @override | ||
404 | + bool hitTestChildren(BoxHitTestResult result, {required Offset position}) { | ||
405 | + Offset offset = (child!.parentData as BoxParentData).offset; | ||
406 | + return result.addWithPaintOffset( | ||
407 | + offset: offset, | ||
408 | + position: position, | ||
409 | + hitTest: (result, newOffset) { | ||
410 | + return child?.hitTest(result, position: newOffset) ?? false; | ||
411 | + }, | ||
412 | + ); | ||
413 | + } | ||
414 | + | ||
415 | + @override | ||
416 | + bool hitTest(BoxHitTestResult result, {required Offset position}) { | ||
417 | + return hitTestChildren(result, position: position); | ||
418 | + } | ||
397 | } | 419 | } |
-
Please register or login to post a comment