Repository: flutter
Issue: BottomSheet's dragHandle should support more personalized theme settings
Labels: c: new feature,framework,f: material design,c: proposal,P3,workaround available,team-design,triaged-design

BottomSheet or ModalBottomSheet is a frequently used component in mobile application development, and developers have high demands for its custom styles. Currently, BottomSheetThemeData has implemented a large part of the custom style support for BottomSheet, but the custom support for dragHandle is very conservative. If you want to achieve the following effect, it is very difficult now. You need to set showDragHandle to false, and then implement a similar DragHandle in the child of BottomSheet.

<img width="348" alt="image" src="https://github.com/user-attachments/assets/d2a6ef0f-e79a-4c95-89c7-c9606140bde2" />


I understand the flutter team's obsession with using Material M3 style for standard components, but most of the time when we develop enterprise-level applications, designers will define new component styles based on the corporate style.  Therefore, supporting richer theme attributes to define styles at the SDK level can simplify a lot of our work, and it does not affect the default Material style of the component.

Here are the changes I made to BottomSheet and BottomSheetThemeData to support the DragHandle style shown above:

```dart
///  How to use
return MaterialApp(
      theme: Theme.of(context).copyWith(
        bottomSheetTheme: const BottomSheetThemeData(
          dragHandleMargin: EdgeInsets.zero,
          dragHandleSize: Size(60, 10),
          dragHandleDecoration: BoxDecoration(
            color: Colors.black87,
            borderRadius: BorderRadius.vertical(
              bottom: Radius.circular(40)
            )
          )
        )
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text('Bottom Sheet Sample')),
        body: const BottomSheetExample(),
      ),
    );
  ```

```dart
///  Modifications to BottomSheetThemeData (simplified code)
const BottomSheetThemeData({
    this.backgroundColor,
    this.surfaceTintColor,
    this.elevation,
    this.modalBackgroundColor,
    this.modalBarrierColor,
    this.shadowColor,
    this.modalElevation,
    this.shape,
    this.showDragHandle,
    this.dragHandleColor,
    this.dragHandleSize,
    this.dragHandleAlignment,  // New properties
    this.dragHandleDecoration, // New properties
    this.dragHandleMargin, // New properties
    this.clipBehavior,
    this.constraints,
  });
```

```dart
/// Modifications to the _DragHandle component (simplified code)
 @override
  Widget build(BuildContext context) {
    final BottomSheetThemeData bottomSheetTheme = Theme.of(context).bottomSheetTheme;
    final BottomSheetThemeData m3Defaults = _BottomSheetDefaultsM3(context);
    final Size handleSize = dragHandleSize ?? bottomSheetTheme.dragHandleSize ?? m3Defaults.dragHandleSize!;
    final BoxDecoration? decoration = bottomSheetTheme.dragHandleDecoration;
    final EdgeInsetsGeometry? margin = bottomSheetTheme.dragHandleMargin;
    final double defaultMargin = math.max(handleSize.height, kMinInteractiveDimension) - handleSize.height;
    return MouseRegion(
      onEnter: (PointerEnterEvent event) => handleHover(true),
      onExit: (PointerExitEvent event) => handleHover(false),
      child: Semantics(
        label: MaterialLocalizations.of(context).modalBarrierDismissLabel,
        container: true,
        onTap: onSemanticsTap,
        child: Align(
          alignment: Alignment.topCenter,
          child: Container(
            height: handleSize.height,
            width: handleSize.width,
            margin: margin ?? EdgeInsets.only(top:defaultMargin/ 2),
            decoration: decoration ??
                BoxDecoration(
                  borderRadius: BorderRadius.circular(handleSize.height / 2),
                  color: MaterialStateProperty.resolveAs<Color?>(dragHandleColor, materialState) ??
                      MaterialStateProperty.resolveAs<Color?>(bottomSheetTheme.dragHandleColor, materialState) ??
                      m3Defaults.dragHandleColor,
                ),
          ),
        ),
      ),
    );
  }
```

The above modifications are just my initial thoughts. The key point is what the flutter development team members think about this. This is the premise for whether this event can be implemented. I hope to get your answers.