Repository: flutter
Issue: TabBarView/PageView interactivity when swiping though the pages
Labels: framework,f: material design,f: scrolling,f: gestures,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.22

### Steps to reproduce

While working on #145848 I came across this. #148317 is also related as there you can swipe between pages and still interact with the page content. That is because trackpad scrolling is a special case that does not set `ignorePointer` to `true` for the page content of the `PageView`

https://github.com/flutter/flutter/assets/12874766/2f756a45-5e42-47d7-98a0-12f071d34e7c

There is no way to interact with the content of the `PageView`/`TabBarView` when the navigation animation is playing. Often times you just want to do an action (e.g. a swipe) on the next page, but the swipe gesture is caught by the `PageView` and translated into the horizontal swipe.

Here are relevant parts from the original PR

> Other scrollables besides PageView. Here I implemented it because it was annoying as shown in the videos at the top, but I did not actually test the native behaviour of either platform. Maybe it "does not work" there either so it is expected. Because if that was the case, the whole preferredBallisticIgnorePointer would go away, simplifying this PR quite a bit. So I'll need to hack together a native app and test this still.

> I hacked together a simple page view using Chat GPT in Kotlin and the same janky behaviour is present there as well. So... what now? From a UX point of view it is horrible, but it is consistent with the native behaviour.

> https://github.com/flutter/flutter/assets/12874766/dd8fda07-2e68-45d5-aeaf-a29a9dc60b24

> That the native world has the same issue, so is it then an issue? Should I bother fixing it here if it may be intended?

To summarize, the native world behaves the same, no input is allowed on the page children, which is sometimes not desirable from a UX point of view. If the user is "swiping" using a trackpad the behaviour is different. I would like to either unify the behaviour, or add an option to make finger swipes not "ignorePointer" :D

### Expected results

I can interact with the content

### Actual results

I cannot interact with the content

### Code sample

Code taken from #145848 sample

<details open><summary>Example code</summary>


```dart
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

void main() {
  debugPrintGestureArenaDiagnostics = true;

  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
  late final TabController _tabController = TabController(length: 6, vsync: this);
  late final TabController _innerTabController = TabController(length: 2, vsync: this);
  late final TabController _thirdTabController = TabController(length: 5, vsync: this);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: TabBarView(
          controller: _tabController,
          children: [
            ListView(
              physics: const BouncingScrollPhysics(),
              children: [
                for (var i = 0; i < 50; i++)
                  GestureDetector(
                    onTap: () {
                      debugPrint('Tapped on item $i');
                    },
                    child: SizedBox(
                      height: 200,
                      child: ElevatedButton(
                        style: const ButtonStyle(
                          backgroundColor: MaterialStatePropertyAll(Colors.blueGrey),
                          splashFactory: InkRipple.splashFactory,
                          overlayColor: MaterialStatePropertyAll(Colors.amber),
                          surfaceTintColor: MaterialStatePropertyAll(Colors.white),
                        ),
                        onPressed: () {
                          debugPrint('Pressed on item $i');
                        },
                        child: Text('Item $i'),
                      ),
                    ),
                  ),
              ],
            ),
            ListView(
              physics: const BouncingScrollPhysics(),
              children: [
                for (var i = 0; i < 50; i++)
                  GestureDetector(
                    onTap: () {
                      debugPrint('Tapped on item $i');
                    },
                    child: SizedBox(
                      height: 200,
                      child: ElevatedButton(
                        style: const ButtonStyle(
                          backgroundColor: MaterialStatePropertyAll(Colors.blueGrey),
                          splashFactory: InkRipple.splashFactory,
                          overlayColor: MaterialStatePropertyAll(Colors.green),
                          surfaceTintColor: MaterialStatePropertyAll(Colors.white),
                        ),
                        onPressed: () {
                          debugPrint('Pressed on item $i');
                        },
                        child: Text('Item $i'),
                      ),
                    ),
                  ),
              ],
            ),
            Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                SizedBox(
                  height: 200,
                  child: ListView.builder(
                    physics: const BouncingScrollPhysics(),
                    scrollDirection: Axis.horizontal,
                    itemBuilder: (context, i) {
                      return ElevatedButton(
                        style: const ButtonStyle(
                          backgroundColor: MaterialStatePropertyAll(Colors.blueGrey),
                          splashFactory: InkRipple.splashFactory,
                          overlayColor: MaterialStatePropertyAll(Colors.green),
                          surfaceTintColor: MaterialStatePropertyAll(Colors.white),
                        ),
                        onPressed: () {
                          debugPrint('Pressed on item $i');
                        },
                        child: Text('Item $i'),
                      );
                    },
                    itemCount: 5,
                  ),
                ),
              ],
            ),
            NestedScrollView(
              physics: const BouncingScrollPhysics(),
              headerSliverBuilder: (context, val) {
                return [
                  SliverAppBar(
                    title: const Text('SliverAppBar'),
                    expandedHeight: 200,
                    flexibleSpace: FlexibleSpaceBar(
                      background: ColoredBox(color: Colors.blueGrey),
                      title: SizedBox(
                        height: 100,
                        child: ElevatedButton(
                          onPressed: () {
                            debugPrint('Pressed on button');
                          },
                          child: const Text('Button'),
                        ),
                      ),
                    ),
                  ),
                ];
              },
              body: TabBarView(
                controller: _innerTabController,
                children: [
                  Container(
                    color: Colors.red,
                    child: ListView.builder(
                      physics: const BouncingScrollPhysics(),
                      itemCount: 20,
                      itemBuilder: (context, i) {
                        return Material(
                          type: MaterialType.transparency,
                          child: ListTile(
                            title: Text('Tab 1Item $i'),
                            onTap: () {
                              debugPrint('Tapped on item $i');
                            },
                          ),
                        );
                      },
                    ),
                  ),
                  Container(
                    color: Colors.green,
                    child: ListView.builder(
                      physics: const BouncingScrollPhysics(),
                      itemCount: 20,
                      itemBuilder: (context, i) {
                        return Material(
                          type: MaterialType.transparency,
                          child: ListTile(
                            title: Text('Tab 2 Item $i'),
                            onTap: () {
                              debugPrint('Tapped on item $i');
                            },
                          ),
                        );
                      },
                    ),
                  ),
                ],
              ),
            ),
            SafeArea(
              child: Column(
                children: [
                  TabBar(controller: _thirdTabController, tabs: [
                    for (var i = 0; i < _thirdTabController.length; i++)
                      Tab(
                        text: 'Tab $i',
                      ),
                  ]),
                  Expanded(
                    child: TabBarView(
                      controller: _thirdTabController,
                      children: [
                        for (var i = 0; i < _thirdTabController.length; i++)
                          ListView(
                            physics: const BouncingScrollPhysics(),
                            children: [
                              for (var j = 0; j < 100; j++)
                                Container(
                                  color: getColorForIndex(j),
                                  child: Material(
                                    type: MaterialType.transparency,
                                    child: ListTile(
                                      title: Text('Item $j'),
                                      onTap: () {
                                        debugPrint('Tapped on item $j');
                                      },
                                    ),
                                  ),
                                ),
                            ],
                          ),
                      ],
                    ),
                  ),
                ],
              ),
            ),
            NestedScrollView(
              headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
                return <Widget>[
                  const SliverAppBar(
                    pinned: true,
                    expandedHeight: 200.0,
                  ),
                ];
              },
              body: ListView.builder(
                itemCount: 50,
                itemBuilder: (BuildContext context, int index) {
                  return Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Text('Item $index'),
                  );
                },
              ),
            ),
          ],
        ),
      ),
    );
  }

  Color getColorForIndex(int index) {
    return index.isEven ? Colors.grey[600]! : Colors.white;
  }
}
```

</details>

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[!] Flutter (Channel [user-branch], 3.22.0-10.0.pre.438, on macOS 14.3 23D56 darwin-arm64, locale en-CZ)
    ! Flutter version 3.22.0-10.0.pre.438 on channel [user-branch] at /Users/michalhazdra/Repositories/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 57d041324b (7 days ago), 2024-05-07 21:25:54 +0200
    • Engine revision 5d94a52687
    • Dart version 3.5.0 (build 3.5.0-131.0.dev)
    • DevTools version 2.35.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/michalhazdra/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/michalhazdra/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.14.3

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2023.2)
    • 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 17.0.9+0-17.0.9b1087.7-11185874)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA.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.89.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0
```

</details>