responsiveValue<T> static method
Get responsive value based on device type
Implementation
static T responsiveValue<T>(
BuildContext context, {
required T mobile,
T? tablet,
T? desktop,
}) {
switch (getDeviceType(context)) {
case DeviceType.desktop:
return desktop ?? tablet ?? mobile;
case DeviceType.tablet:
return tablet ?? mobile;
case DeviceType.mobile:
return mobile;
}
}