Repository: flutter
Issue: Parent InteractiveViewer does not pan on fullsized nested InteractiveViewer.
Labels: framework,f: material design,has reproducible steps,found in release: 2.10,found in release: 2.11,team-design,triaged-design

**Problem description:**
I have an application that sometimes has multiple InteractiveViewer inside of each other. This is in itself no problem as they behave nearly the same as SingleChildScrollViews in each other.
The only difference is when a SingleChildScrollView is in another but itself is not "constrained" and can therefore not scroll, it lets the parent SingleChildScrollView scroll. An InteractiveViewer never lets its parent pane, even if itself could not pane in any direction anyways.

I am not talking about if a SingleChildScrollView is scrolled to the bottom to then scroll the parent. I only specifically talk about the instance when a SingleChildScrollView does not have anything to scroll at all. Then it lets its parent scroll even if the event is theoretically on itself.

Changing constrained to "true" or "false" did not result in any change of InteractiveViewer behaviour.

**Expected results:** 
If an InteractiveViewer does not have any direction to pane to, as it does not have a child bigger than itself, it should let a parent InteractiveViewer use its area as a paneable area.

**Actual results:** <!-- what did you see? -->
If an InteractiveViewer does not have any direction to pane to, as it does not have a child bigger than itself, it does not let a parent InteractiveViewer use its area as a paneable area.

<details>
<summary>Code sample - InteractiveViewer</summary>

```

import 'package:flutter/material.dart';

class MyAppInteractiveViewer extends StatelessWidget {
  const MyAppInteractiveViewer({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePageInteractiveViewer(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePageInteractiveViewer extends StatefulWidget {
  const MyHomePageInteractiveViewer({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePageInteractiveViewer> createState() => _MyHomePageInteractiveViewerState();
}

class _MyHomePageInteractiveViewerState extends State<MyHomePageInteractiveViewer> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Stack(
          children: [getFirstViewer()],
        ),
      ),
    );
  }
}

Positioned getFirstViewer() {
  return Positioned(
    top: 0,
    left: 0,
    width: 200,
    height: 400,
    child: InteractiveViewer(
      constrained: false,
      child: Stack(
        children: [
          const SizedBox(width: 200, height: 600),
          getSecondViewer(),
          Positioned(
            top: 200,
            left: 0,
            width: 200,
            height: 400,
            child: Container(color: Colors.green),
          )
        ],
      ),
    ),
  );
}

Positioned getSecondViewer() {
  return Positioned(
    top: 0,
    left: 0,
    width: 200,
    height: 200,
    child: InteractiveViewer(
      constrained: false,
      child: Container(
        color: Colors.red,
        width: 180, // x <= 180, should let scroll parent as nothing to scroll; x > 180 should not let parent scroll as it has something to scroll to;
        height: 180, //  x <= 180, should let scroll parent as nothing to scroll; x > 180 should not let parent scroll as it has something to scroll to;
        margin: const EdgeInsets.all(10),
      ),
    ),
  );
}

```

</details>

<details>
<summary>Code sample - ScrollView</summary>

```

import 'package:flutter/material.dart';

class MyAppScrollView extends StatelessWidget {
  const MyAppScrollView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePageScrollView(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePageScrollView extends StatefulWidget {
  const MyHomePageScrollView({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePageScrollView> createState() => _MyHomePageScrollViewState();
}

class _MyHomePageScrollViewState extends State<MyHomePageScrollView> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Stack(
          children: [getFirstViewer()],
        ),
      ),
    );
  }
}

Positioned getFirstViewer() {
  return Positioned(
    top: 0,
    left: 0,
    width: 200,
    height: 400,
    child: SingleChildScrollView(
      scrollDirection: Axis.horizontal,
      child: SingleChildScrollView(
        scrollDirection: Axis.vertical,
        child: Stack(
          children: [
            const SizedBox(width: 200, height: 600),
            getSecondViewer(),
            Positioned(
              top: 200,
              left: 0,
              width: 200,
              height: 400,
              child: Container(color: Colors.green),
            )
          ],
        ),
      ),
    ),
  );
}

Positioned getSecondViewer() {
  return Positioned(
    top: 0,
    left: 0,
    width: 200,
    height: 200,
    child: SingleChildScrollView(
      scrollDirection: Axis.horizontal,
      child: SingleChildScrollView(
        scrollDirection: Axis.vertical,
        child: Container(
          color: Colors.red,
          width: 180, //  x <= 180, should let scroll parent as nothing to scroll; x > 180 should not let parent scroll as it has something to scroll to;
          height: 180, //  x <= 180, should let scroll parent as nothing to scroll; x > 180 should not let parent scroll as it has something to scroll to;
          margin: const EdgeInsets.all(10),
        ),
      ),
    ),
  );
}

```

</details>

<details>
  <summary>Flutter doctor</summary>

```

[√] Flutter (Channel stable, 2.10.2, on Microsoft Windows [Version 10.0.19044.1526], locale de-AT)
    • Flutter version 2.10.2 at C:\tools\Flutter\Flutter_2.10.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 097d3313d8 (3 days ago), 2022-02-18 19:33:08 -0600
    • Engine revision a83ed0e5e3
    • Dart version 2.16.1
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\theiss\AppData\Local\Android\sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: C:\tools\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)    
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe     

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2020.3)
    • Android Studio at C:\tools\Android Studio
    • 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-7249189)

[√] Connected device (4 available)
    • SM T500 (mobile)  • R9AR800H8RK • android-arm64  • Android 11 (API 30)
    • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.19044.1526]
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 98.0.4758.102
    • Edge (web)        • edge        • web-javascript • Microsoft Edge 98.0.1108.50

[√] HTTP Host Availability
    • All required HTTP hosts are available

```
</details>