Repository: flutter
Issue: change the hitTestChildren in RenderStack
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

## explanation

current `RenderStack` implementation uses default `defaultHitTestChildren` which goes as - hit test children list backwards and stop after the first child reports that it's been hit

this causes a lot of confusion since developers often don't know about this behavior and expect the `Stack` to work in the same way the widget tree does (see https://github.com/flutter/flutter/issues/47119, https://github.com/flutter/flutter/issues/74707, https://github.com/flutter/flutter/issues/18450, https://github.com/flutter/flutter/issues/75086 and these are only a few ones i believe)
imo that makes sense because from the devs' pov, `Stack` can look like a widget that sort of flattens the widget tree

## sample

consider the following example that demonstrates how we can build two similar UIs:
1. with `Stack`
2. with default widget nesting

<details>
<summary>example code</summary>

```dart
import 'package:flutter/material.dart';

void main(){
  return runApp(
    MaterialApp(
      home: HomeStack(),
    ),
  );
}

class HomeStack extends StatelessWidget {
  @override
  Widget build(BuildContext context){
    final screenWidth = MediaQuery.of(context).size.width;
    return Stack(
        children: [
          Listener(
            behavior: HitTestBehavior.translucent,
            onPointerDown: (_) {
              print('tapped 1');
            },
            child: Container(
              color: Colors.red,
            ),
          ),
          Positioned(
            top: 0,
            child: Listener(
              behavior: HitTestBehavior.translucent,
              onPointerDown: (_) {
                print('tapped 2');
              },
              child: Container(
                height: 300,
                width: screenWidth,
                color: Colors.yellow,
              ),
            ),
          ),
          Positioned(
            top: 0,
            child: Listener(
             behavior: HitTestBehavior.translucent,
             onPointerDown: (_) {
               print('tapped 3');
             },
             child: Container(
                height: 150,
                width: screenWidth,
                color: Colors.blue,
              ),
            ),
          ),
        ],
     );
  }
}

class HomeWidgetTree extends StatelessWidget {
  @override
  Widget build(BuildContext context){
    final screenWidth = MediaQuery.of(context).size.width;
    final screenHeight = MediaQuery.of(context).size.height;
    return Scaffold(
      body: Listener(
        behavior: HitTestBehavior.translucent,
        onPointerDown: (_) {
          print('tapped 1');
        },
        child: Container(
          alignment: Alignment.topCenter,
          width: screenWidth,
          height: screenHeight,
          color: Colors.red,
          child: Listener(
            behavior: HitTestBehavior.translucent,
            onPointerDown: (_) {
              print('tapped 2');
            },
            child: Container(
              alignment: Alignment.topCenter,
              height: 300,
              width: screenWidth,
              color: Colors.yellow,
              child: Listener(
                behavior: HitTestBehavior.translucent,
                onPointerDown: (_) {
                  print('tapped 3');
                },
                child: Container(
                  height: 150,
                  width: screenWidth,
                  color: Colors.blue,
                ),
              ),
            ),
          ),
        ),
      ),  
    );
  }
}
```
</details>

if you try to tap the laying on top blue container, then yellow, then red, outputs will be so

logs
```
// HomeStack

tapped 3 // blue
tapped 2 // yellow
tapped 1 // red

// HomeWidgetTree

tapped 3 // blue
tapped 2
tapped 1
tapped 2 // yellow
tapped 1
tapped 1 // red
```

## proposal

change the current implementation of `hitTestChildren` to work more similar to widget tree - that is iterate the `Stack` children and hit test them (visually) from bottom to top, or (in the code) from first to last. so in the above example that would lead to the same outputs that we can see with the widget tree

## context
i'm opening this in favor of https://github.com/flutter/flutter/issues/75090 with the suggestions of which i can't agree