buildResponsive method

  1. @override
Widget buildResponsive(
  1. BuildContext context,
  2. Breakpoints breakpoint
)
override

Builds with the current Breakpoints. This method will be automatically called when the breakpoint changes.

Implementation

@override
Widget buildResponsive(BuildContext context, Breakpoints breakpoint) {
  final constraints = data.getForBreakpoint(breakpoint);

  return ConstrainedBox(
    constraints: constraints ?? const BoxConstraints(),
    child: child,
  );
}