import 'package:flutter/material.dart';

/// Presents a rounded feature modal with consistent safe-area handling.
Future<T?> showFeatureModalBottomSheet<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  double heightFactor = 0.9,
  bool isScrollControlled = true,
  Color backgroundColor = Colors.transparent,
}) {
  return showModalBottomSheet<T>(
    context: context,
    isScrollControlled: isScrollControlled,
    backgroundColor: backgroundColor,
    builder: (sheetContext) => FractionallySizedBox(
      heightFactor: heightFactor,
      child: builder(sheetContext),
    ),
  );
}
