InteractiveViewer OnInteractionUpdate provides (0,0) coordinates when scrolling.

Steps to Reproduce

Recently, a commit hit master that caused OnInteractionUpdate to be triggered when scrolling. This update provides (0,0) coordinates and breaks applications that rely on interaction updates for coordinate changes of objects within the page.
With the code below you will notice that taps on the screen provide the correct coordinates, but when scrolling, (0,0) is provided.

cc: @justinmc per #65432 (comment)

import 'package:flutter/material.dart';

void main() {

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          // This is the theme of your application.
          // Try running your application with "flutter run". You'll see the
          // application has a blue toolbar. Then, without quitting the app, try
          // changing the primarySwatch below to and then invoke
          // "hot reload" (press "r" in the console where you ran "flutter run",
          // or simply save your changes to "hot reload" in a Flutter IDE).
          // Notice that the counter didn't reset back to zero; the application
          // is not restarted.
          // This makes the visual density adapt to the platform that you run
          // the app on. For desktop platforms, the controls will be smaller and
          // closer together (more dense) than on mobile platforms.
          visualDensity: VisualDensity.adaptivePlatformDensity,
        home:  MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  int _rowCount = 5;
  int _columnCount = 5;
  bool _text = true;
  bool _color = true;

  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        title: Text("Column: $_columnCount\nRow: $_rowCount"),
        actions: [
              icon: Icon(Icons.add),
              onPressed: () {
                setState(() {
                  _rowCount += 5;
                  _columnCount += 5;
              icon: Icon(Icons.format_paint),
              onPressed: () {
                setState(() {
                  _color = !_color;
              icon: Icon(Icons.text_fields),
              onPressed: () {
                setState(() {
                  _text = !_text;
        // Here we take the value from the MyHomePage object that was created by
        // the method, and use it to set our appbar title.
      body: InteractiveViewer(
          scaleEnabled: true,
          panEnabled: true,
          constrained: false,
          onInteractionUpdate: (details) {
          child: Table(
            columnWidths: <int, TableColumnWidth>{
              for (int column = 0; column < _columnCount; column++)
                column: const FixedColumnWidth(300.0),
            children: <TableRow>[
              for (int row = 0; row < _rowCount; row++)
                  children: <Widget>[
                    for (int column = 0; column < _columnCount; column++)
                          child: _text
                              ? Text("Column: $_columnCount\nRow: $_rowCount")
                              : null,
                          height: 100,
                          color: _color
                              ? row %% 2 + column %% 2 == 1
                              : null),
      // This trailing comma makes auto-formatting nicer for build methods.

[√] Flutter (Channel master, 1.22.0-10.0.pre.205, on Microsoft Windows [Version 10.0.19041.508], locale en-US)
    • Flutter version 1.22.0-10.0.pre.205 at C:\src\flutter
    • Framework revision 0220c3585c (24 hours ago), 2020-09-16 23:13:05 +0800
    • Engine revision 1ef10b240e
    • Dart version 2.10.0 (build

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from:
      On first launch it will assist you in installing the Android SDK components.
      (or visit for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[!] Android Studio (not installed)
    • Android Studio not found; download from
      (or visit for detailed instructions).

[√] VS Code (version 1.49.0)
    • VS Code at C:\Users\Miche\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.14.1

[√] Connected device (3 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 85.0.4183.102
    • Edge (web)       • edge       • web-javascript • Microsoft Edge 85.0.564.44

1 possible answer(s) on “InteractiveViewer OnInteractionUpdate provides (0,0) coordinates when scrolling.