buildWithGrid method

Widget buildWithGrid(
  1. BuildContext context,
  2. TBreakpoint bp,
  3. double unitWidth,
  4. double gapX,
)

Internal method used by TGridRow to calculate the width.

Implementation

Widget buildWithGrid(BuildContext context, TBreakpoint bp, double unitWidth, double gapX) {
  final size = TGridSize(sm: sm, md: md, lg: lg);
  final span = size.getSpan(bp);
  final width = (unitWidth * span) + ((span - 1) * gapX);

  return SizedBox(
    width: width,
    child: padding != null ? Padding(padding: padding!, child: child) : child,
  );
}