Repository: flutter
Issue: Scroll bars incorrectly rendered with view padding
Labels: framework,f: material design,f: scrolling,f: cupertino,c: proposal,P2,team-design,triaged-design

In the following video, the `CupertinoAlertDialog`'s content section scrolls, but the scroll bar displays incorrectly for having a padding at top or bottom, even though nowhere in `CupertinoAlertDialog` sets such a padding.

https://github.com/flutter/flutter/assets/1596656/3356638d-1a23-4054-9f74-3d4cecb2063e

## Reproduction

Run the following code on an iPhone simulator (running on Web or macOS wouldn't work, as will be explained below)
```dart
import 'package:flutter/cupertino.dart';

Widget createAppWithButtonThatLaunchesDialog({
  required WidgetBuilder dialogBuilder,
  bool? useMaterial3,
}) {
  return CupertinoApp(
    // theme: CupertinoThemeData(brightness: Brightness.light),
    home: CupertinoPageScaffold(
      child: Center(
        child: Builder(builder: (BuildContext context) {
          return CupertinoButton(
            onPressed: () {
              showCupertinoDialog<void>(
                context: context,
                builder: dialogBuilder,
              );
            },
            child: const Text('Go'),
          );
        }),
      ),
    ),
  );
}

void main() => runApp(const ActionSheetApp());

class ActionSheetApp extends StatelessWidget {
  const ActionSheetApp({super.key});

  @override
  Widget build(BuildContext context) {
    return createAppWithButtonThatLaunchesDialog(
        dialogBuilder: (BuildContext context) {
          return CupertinoAlertDialog(
            title: Text('The title' * 200),
          );
        },
      );
  }
}
```

## Analysis

The problem is caused by `CupertinoScrollbar` assigning `MediaQuery.paddingOf(context)` as the padding for the scroll bar:
https://github.com/flutter/flutter/blob/64dd1ca9bc32fbc767a3f63e4c9c5ae2fc355380/packages/flutter/lib/src/cupertino/scrollbar.dart#L159

The current padding inherits non-zero values from the view padding, and therefore all scrollbars that are not wrapped in a `SafeArea` are incorrectly rendered with the view padding. 

This problem is not exclusive to `CupertinoScrollbar`, but also `MaterialScrollbar`.

## Proposal

I doubt how this setting makes sense at all. 
- The MediaQuery padding usually describes the visible Flutter view instead of the container widget of the scroll bar, therefore the MediaQuery padding will not describe how much the scroll bar is obscured by its container widget, unless the scrollbar is used full screen.
- Even then, the padding might not be concerning at all. At least the native Apple apps don't care about the scroll bar being partially obscured by ClipRRect:
<img width="415" alt="image" src="https://github.com/flutter/flutter/assets/1596656/450da376-e8a4-4b72-89fa-1a46e613c79c">

- Even if we think this behavior makes sense as a default setting, the padding is not exposed and therefore can not be from by outside.

I think we should remove the setting and make scrollbars have no padding by default.
- Alternatively, if we really think this behavior makes sense and the parent widget should correctly describe MediaQuery padding to its scrollbar children, we should explicitly describe it in the doc and recommend `SafeArea`.