responsiveMargin static method

EdgeInsets responsiveMargin(
  1. double width
)

Calculates responsive margin based on screen width.

Implementation

static EdgeInsets responsiveMargin(double width) {
  if (width >= ResponsiveBreakpoints.tablet) {
    return const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16.0);
  }
  if (width >= ResponsiveBreakpoints.mobile) {
    return const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0);
  }
  return const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8.0);
}