showPlayerProfileSheet function

void showPlayerProfileSheet(
  1. BuildContext context, {
  2. required String playerId,
  3. required SeatTypeEnum type,
})

Shows a player's profile in the compact modal presentation.

Implementation

void showPlayerProfileSheet(
  BuildContext context, {
  required String playerId,
  required SeatTypeEnum type,
}) {
  showModalBottomSheet<void>(
    context: context,
    isScrollControlled: true,
    useSafeArea: true,
    // Retain the framework Material so M3 supplies the surface, shape, ink,
    // and its compact-versus-wide maximum width behavior.
    showDragHandle: true,
    builder: (sheetContext) => DraggableScrollableSheet(
      initialChildSize: 0.5,
      minChildSize: 0.35,
      maxChildSize: 0.9,
      expand: false,
      builder: (_, scrollController) => PlayerProfilePanel(
        playerId: playerId,
        type: type,
        scrollController: scrollController,
        onBeforeReplay: () => Navigator.of(sheetContext).pop(),
      ),
    ),
  );
}