showWhen method
Conditionally shows a widget based on the current breakpoint.
md: The minimum breakpoint for the widget to be shown.widget: The widget to display when the breakpoint is greater than or equal tomd.
Returns the widget or an empty SizedBox if the condition is not met.
Implementation
Widget showWhen(Breakpoint md, Widget widget) {
if (breakpoint.toSize >= md.toSize) {
return widget;
}
return const SizedBox.shrink();
}