maxWidgetWidth property
double
get
maxWidgetWidth
Gets the responsive maximum width for a widget based on the current screen type. For tablets, it uses dynamic logic based on the stored context. Defaults to GridConstants.mobileWidgetMaxWidth if the screen type is not set.
Implementation
double get maxWidgetWidth {
return switch (screenType) {
ScreenType.mobile => GridConstants.mobileWidgetMaxWidth,
ScreenType.tablet => GridConstants.getTabletWidgetMaxWidth(),
ScreenType.desktop => GridConstants.desktopWidgetMaxWidth,
null => GridConstants.mobileWidgetMaxWidth,
};
}