MouseTracker 移至渲染
Summary
#MouseTracker
and related symbols are moved from the
gestures
package, resulting in error messages such as
undefined classes or methods. Import them from rendering
package instead.
Context
#Prior to this change MouseTracker
was part of the
gestures
package. This brought troubles when we found out
that code related to MouseTracker
often wanted to
import from the rendering
package.
Since MouseTracker
turned out to be more connected to
rendering
than gestures
, we have moved it and its
related code to rendering
.
Description of change
#The file mouse_tracking.dart
has been moved from the
gestures
package to rendering
. All symbols in the said
file have been moved without keeping backward compatibility.
Migration guide
#If you see error of "Undefined class" or "Undefined name" of the following symbols:
MouseDetectorAnnotationFinder
MouseTracker
MouseTrackerAnnotation
PointerEnterEventListener
PointerExitEventListener
PointerHoverEventListener
You should add the following import:
import 'package:flutter/rendering.dart';
Timeline
#Landed in version: 1.16.3
In stable release: 1.17
References
#API documentation:
MouseDetectorAnnotationFinder
MouseTracker
MouseTrackerAnnotation
PointerEnterEventListener
PointerExitEventListener
PointerHoverEventListener
Relevant issues:
Relevant PR:
除非另有说明,本文档之所提及适用于 Flutter 的最新稳定版本,本页面最后更新时间: 2024-04-27。 查看文档源码 或者 为本页面内容提出建议。