Repository: flutter
Issue: onExit parameter isn't called when MouseRegion widget is applied to a Scaffold on web
Labels: framework,platform-web,platform-linux,a: mouse,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-web,triaged-web

This works as expected on flutter desktop, but fails on web.

Expected:
As the mouse leaves the flutter Web Application, the container's width and height should be set to 0.
![Screenshot from 2022-07-12 02-54-00](https://user-images.githubusercontent.com/73116038/178391574-8a048232-e345-4a7d-a77c-873c39025fd1.png)


Actual:
Container width and height remains the same the moment the mouse leaves the scaffold area.
![Screenshot from 2022-07-12 02-47-53](https://user-images.githubusercontent.com/73116038/178390868-f2f7abea-c4f2-46fd-9256-3ab90c498a9b.png)

<details>
    <summary>Reproduceable code: </summary>

    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return const MaterialApp(
          debugShowCheckedModeBanner: false,
          home: HomePage(),
        );
      }
    }
    
    class HomePage extends StatefulWidget {
      const HomePage({Key? key}) : super(key: key);
    
      @override
      State<HomePage> createState() => _HomePageState();
    }
    
    class _HomePageState extends State<HomePage> {
    
      double x = 0;
      double y = 0;
    
      void _updateLocation(PointerEvent details) {
        setState(() {
          x = details.position.dx;
          y = details.position.dy;
        });
      }
    
      void _onExit(PointerEvent details) {
        setState(() {
          x = 0;
          y = 0;
        });
      }
      @override
      Widget build(BuildContext context) {
        return MouseRegion(
          onHover: _updateLocation,
          onExit: _onExit,
          child: Scaffold(
            body: Container(
              decoration: BoxDecoration(
                color: Colors.black45,
                borderRadius: BorderRadius.circular(10.0),
              ),
              width: x,
              height: y,
              child: Text("The position at x is $x and the position at y is $y"),
            ),
          ),
        );
      }
    }
    
</details>

<details>
    <summary>flutter doctor -v</summary>
    
    [✓] Flutter (Channel stable, 3.0.4, on LMDE 5 (elsie) 5.10.0-16-amd64, locale
        en_GB.UTF-8)
        • Flutter version 3.0.4 at /home/henryr/Dev/SDK/Flutter/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 85684f9300 (11 days ago), 2022-06-30 13:22:47 -0700
        • Engine revision 6ba2af10bb
        • Dart version 2.17.5
        • DevTools version 2.12.2
    
    [✓] Android toolchain - develop for Android devices (Android SDK version
        32.1.0-rc1)
        • Android SDK at /home/henryr/Android/Sdk
        • Platform android-32, build-tools 32.1.0-rc1
        • Java binary at:
          /home/henryr/Dev/SDK/AndroidStudio/android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build
          11.0.12+0-b1504.28-7817840)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at google-chrome
    
    [✓] Linux toolchain - develop for Linux desktop
        • Debian clang version 11.0.1-2
        • cmake version 3.18.4
        • ninja version 1.10.1
        • pkg-config version 0.29.2
    
    [✓] Android Studio (version 2021.2)
        • Android Studio at /home/henryr/Dev/SDK/AndroidStudio/android-studio
        • Flutter plugin version 67.1.2
        • Dart plugin version 212.5744
        • Java version OpenJDK Runtime Environment (build
          11.0.12+0-b1504.28-7817840)
    
    [✓] Connected device (2 available)
        • Linux (desktop) • linux  • linux-x64      • LMDE 5 (elsie) 5.10.0-16-amd64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 103.0.5060.114
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    • No issues found!
    
   
</details>