frostedFrameBuilder static method

Widget frostedFrameBuilder(
  1. BuildContext context,
  2. PanelState state,
  3. Widget child
)

Implementation

static Widget frostedFrameBuilder(BuildContext context, PanelState state, Widget child) {
  var theme = PanelsTheme.of(context)!.data;
  var border = BorderRadius.only(bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0), topRight: Radius.circular(10.0));

  return Container(
    decoration: BoxDecoration(
      borderRadius: border,
      border: Border.all(color: Colors.black.withOpacity(0.2)),
    ),
    child: ClipRRect(
        borderRadius: border,
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 12.0, sigmaY: 12.0),
          child: Material(
              shape: RoundedRectangleBorder(
                borderRadius: border,
              ),
              type: MaterialType.transparency,
              child: Container(color: theme.debugColors?[9], child: child)),
        )),
  );
}