maybeWhenDevice<T> method
T
maybeWhenDevice<T>({
- ValueGetter<
T> ? mobile, - ValueGetter<
T> ? tablet, - ValueGetter<
T> ? desktop, - required ValueGetter<
T> orElse,
When current size resent mobile
, tablet
, desktop
Or return orElse
if not provided
Implementation
T maybeWhenDevice<T>({
ValueGetter<T>? mobile,
ValueGetter<T>? tablet,
ValueGetter<T>? desktop,
required ValueGetter<T> orElse,
}) =>
whenDevice(
mobile: mobile ?? orElse,
tablet: tablet ?? orElse,
desktop: desktop ?? orElse,
);