show<T> static method

Future<T?> show<T>(
  1. BuildContext context, {
  2. required Widget child,
  3. String? title,
  4. double width = 480,
})

Implementation

static Future<T?> show<T>(
  BuildContext context, {
  required Widget child,
  String? title,
  double width = 480,
}) {
  final theme = CLTheme.of(context);
  return showShadSheet<T>(
    context: context,
    side: ShadSheetSide.right,
    barrierColor: kCLModalScrim,
    builder: (ctx) => ShadSheet(
      // Chrome coerente coi modali CL: secondaryBackground, hairline cardBorder,
      // popoverShadow, radiusModal sul lato libero (sinistro).
      constraints: BoxConstraints(minWidth: width, maxWidth: width),
      backgroundColor: theme.secondaryBackground,
      border: Border.all(color: theme.cardBorder),
      shadows: theme.popoverShadow,
      radius: BorderRadius.only(
        topLeft: Radius.circular(theme.radiusModal),
        bottomLeft: Radius.circular(theme.radiusModal),
      ),
      title: title == null ? null : Text(title, style: theme.heading4),
      child: child,
    ),
  );
}