cardRadiusOf method

  1. @override
BorderRadius cardRadiusOf(
  1. BuildContext context
)
override

The corners of the sheet the page moves in, never the display's.

Implementation

@override
BorderRadius cardRadiusOf(BuildContext context) {
  return switch (SheetProvider.of(context)?.type) {
    SheetType.bottomSheet =>
      SheetCornersScope.maybeOf(context) ?? bottomSheetRadiusOf(context),
    SheetType.formSheet => switch (formSheetShape) {
      RoundedSuperellipseBorder(:final borderRadius) => borderRadius.resolve(
        Directionality.of(context),
      ),
      _ => BorderRadius.zero,
    },
    _ => BorderRadius.zero,
  };
}