Flutter app cannot be scrolled with TeamViewer

Few months ago I updated my flutter version to 2.5.3 and recently I noticed that I cannot scroll the app on a remote device using TeamViewer, but I can click it using TeamViewer, the app reacts to clicks, but scrolling is not possible, but I can scroll it on the device, without any issues.
The console log that I am getting while scrolling in TeamViewer is :

I/ViewRootImpl@ef07da6[MainActivity](10095): ViewPostIme pointer 0
I/ViewRootImpl@ef07da6[MainActivity](10095): ViewPostIme pointer 1

Can you please help me to solve this issue? Please let me know if any additional information is required.

My current flutter doctor:

[✓] Flutter (Channel stable, 2.5.3, on macOS 12.2.1 21D62 darwin-x64, locale en-GB)
    • Flutter version 2.5.3 at /Users/svarog/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (4 months ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/svarog/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.2.1, Build version 13C100
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] Android Studio (version 2020.3)
    • Android Studio at /Users/svarog/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] Android Studio (version 2020.3)
    • Android Studio at /Users/svarog/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] IntelliJ IDEA Community Edition (version 2021.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.34.0

[✓] Connected device (3 available)
    • SM G970F (mobile)                     • RF8M728WTMP   • android-arm64  • Android 12 (API 31)
    • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64    • Android 9 (API 28) (emulator)
    • Chrome (web)                          • chrome        • web-javascript • Google Chrome 92.0.4515.131

• No issues found!

1 thought on “Flutter app cannot be scrolled with TeamViewer

  1. As pointed out by @maheshmnj before, it becomes issue started with flutter 2.5 because of changing mouse scroll behaviour and I found a solution here :
    https://stackoverflow.com/questions/69232764/flutter-web-cannot-scroll-with-mouse-down-drag-flutter-2-5

    The last bottom solution works good for me, basically we just need to add drag devices with scroll behaviour, and that can be achieved in main.dart :

    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          scrollBehavior: MaterialScrollBehavior().copyWith(
            dragDevices: {PointerDeviceKind.mouse, PointerDeviceKind.touch, PointerDeviceKind.stylus, PointerDeviceKind.unknown},
          ),
          ...
    
    
    

    Hope it helps.

Comments are closed.