Repository: flutter
Issue: userGestureInProgress return false on Android
Labels: platform-android,framework,f: routes,has reproducible steps,P3,found in release: 3.10,team-android,triaged-android,found in release: 3.13

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

Added 

`WillPopScope` with `Navigator.of(context).userGestureInProgress` above your app widgets
Example:

```dart
WillPopScope(
      onWillPop: () async {
        print('${Navigator
            .of(context)
            .userGestureInProgress}');
        return false;
      },
      child: Material(
```

And run it on your Android device.

Now swipe back from the sides of the phone.

### Expected results

When swiping back on the sides of the phone `Navigator.of(context).userGestureInProgress` will return true.

### Actual results

`Navigator.of(context).userGestureInProgress` return false on Android.

Important:
1. it does works on IOS
2. another [user found](https://stackoverflow.com/questions/49161644/flutter-disable-swipe-to-navigate-back-in-ios-and-android) it before me 2021 

> Not working on Android. userGestureInProgress always returns false


### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: () async {
        bool backGesture = Navigator.of(context).userGestureInProgress;
        print('backGesture: $backGesture');
        return false;
      },
      child: const Scaffold(
        backgroundColor: Colors.red,
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details><summary>Logs</summary>

```console
[+1977 ms] I/ViewRootImpl@53e4691[MainActivity](13118): ViewPostIme pointer 0
[ +177 ms] D/WindowOnBackDispatcher(13118): onBackInvoked, viewRoot=ViewRootImpl@53e4691[MainActivity], callback=android.view.ViewRootImpl$$ExternalSyntheticLambda17@a9c41f7
[   +3 ms] I/ViewRootImpl@53e4691[MainActivity](13118): ViewPostIme key 0
[        ] D/Activity(13118): onKeyDown(KEYCODE_BACK)
[        ] I/ViewRootImpl@53e4691[MainActivity](13118): ViewPostIme key 1
[        ] D/Activity(13118): onKeyUp(KEYCODE_BACK) isTracking()=true isCanceled()=false hasCallback=false
[   +2 ms] I/flutter (13118): backGesture: false

```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
flutter doctor -v
[√] Flutter (Channel stable, 3.10.0, on Microsoft Windows [Version 10.0.22621.1848], locale en-IL)
    • Flutter version 3.10.0 on channel stable at C:\Users\guy\Programs\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 84a1e904f4 (9 weeks ago), 2023-05-09 07:41:44 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at C:\Users\guy\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: C:\Users\guy\Programs\Android\Android_Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33205.214
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.2)
    • Edge (web)                 • edge          • web-javascript • Microsoft Edge 114.0.1823.67

[√] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>