value property
T
get
value
Gets the value for the current screen size.
Implementation
T get value {
final data = AdaptiveData.of(_context);
final info = data.getDeviceInfo(_context);
switch (info.screenSize) {
case ScreenSize.xs:
return _xs ?? _defaultValue ?? _sm ?? _md ?? _lg ?? _xl as T;
case ScreenSize.sm:
return _sm ?? _xs ?? _md ?? _lg ?? _xl ?? _defaultValue as T;
case ScreenSize.md:
return _md ?? _sm ?? _lg ?? _xs ?? _xl ?? _defaultValue as T;
case ScreenSize.lg:
return _lg ?? _md ?? _xl ?? _sm ?? _xs ?? _defaultValue as T;
case ScreenSize.xl:
return _xl ?? _lg ?? _md ?? _sm ?? _xs ?? _defaultValue as T;
}
}