Skip to content
Boring Doc
BreakingHigh impactOfficial migration guidesince 1.17.0landed 1.16.3

MouseTracker moved to rendering

Framework · Official source

`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.

Original behavior

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.

New behavior

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.

Who is affected
Applications and packages relying on the previous behaviour or signature. Code that uses MouseTracker, MouseDetectorAnnotationFinder, MouseTrackerAnnotation and related APIs.
Practical impact
Behaviour or API differences that can break builds or change runtime behaviour.
What action should I take?
Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Migration checklist0/6
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

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';
Migration assistantAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Official migration guide·Verified classification (95%)

Listed in the official breaking-changes index (docs.flutter.dev/release/breaking-changes).

An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.

Source commit
b3045439b7c0
Source last updated
Oct 21, 2026
Last synchronized
Oct 21, 2026
Publication status
published
Publication history
  • Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI explanationAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Was this useful?
MouseTracker moved to rendering · Boring Doc