from static method

XSafeAreaParams? from(
  1. XSafeArea widget,
  2. SSRBuildContext context,
  3. WidgetMetadata metadata
)

Implementation

static XSafeAreaParams? from(
  XSafeArea widget,
  SSRBuildContext context,
  WidgetMetadata metadata,
) {
  final child = _cookWidget(widget.child, context);

  if (metadata.vanish && child == null) {
    return null;
  }

  return XSafeAreaParams(
    child: child ?? const EmptyWidget(),
    maintainBottomViewPadding: widget.maintainBottomViewPadding ?? false,
    top: widget.top ?? true,
    bottom: widget.bottom ?? true,
    left: widget.left ?? true,
    right: widget.right ?? true,
  );
}