Taha Tesser 8ea38a7921
Fix AppBar back button doesn't navigate back when using TooltipTriggerMode.tap in the TooltipTheme (#155822)
Fixes [AppBar BackButton Tooltip interferes with clicking button when TooltipThemeData set to TooltipTriggerMode.tap](https://github.com/flutter/flutter/issues/152315)

### Description
`TooltipTheme` with `triggerMode: TooltipTriggerMode.tap` prevents user from navigating back when tapping on the back button. `triggerMode: TooltipTriggerMode.tap` shouldn't interrupted the back button navigation back callback.

### Code sample

<details>
<summary>expand to view the 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(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        tooltipTheme:
            const TooltipThemeData(triggerMode: TooltipTriggerMode.tap),
      ),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Sample'),
        ),
        body: Builder(builder: (context) {
          return Center(
            child: ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => const SecondScreen(),
                  ),
                );
              },
              child: const Text('Go to Second Screen'),
            ),
          );
        }),
      ),
    );
  }
}

class SecondScreen extends StatelessWidget {
  const SecondScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Second Screen'),
      ),
      body: const Center(
        child: Tooltip(
          message: 'This is the second screen',
          child: Text('Tap to show tooltip'),
        ),
      ),
    );
  }
}
```

</details>

### Before

https://github.com/user-attachments/assets/ed2020f0-aef8-40f9-be05-55ff80e42e5d

### After

https://github.com/user-attachments/assets/8d65f9f8-d15d-453f-955f-e5d92f8a04e8
2024-10-15 12:30:28 +00:00
..

Flutter

Flutter is a new way to build high-performance, cross-platform mobile, web, and desktop apps. Flutter is optimized for today's — and tomorrow's — mobile and desktop devices. We are focused on low-latency input and high frame rates on all platforms.

See the getting started guide for information about using Flutter.