ResponsiveValue<T>.from constructor
ResponsiveValue<T>.from ({
- bool allowNull = false,
- T? large,
- T? medium,
- T? small,
- T? xsmall,
- T? fallback,
Implementation
factory ResponsiveValue.from(
// T? xlarge,
{
bool allowNull = false,
T? large,
T? medium,
T? small,
T? xsmall,
T? fallback,
}) {
T? xlargeValue;
T? largeValue;
T? mediumValue;
T? smallValue;
T? xsmallValue;
if (xsmall != null) {
xsmallValue = xsmall;
smallValue = xsmall;
mediumValue = xsmall;
largeValue = xsmall;
xlargeValue = xsmall;
}
if (small != null) {
smallValue = small;
mediumValue = small;
largeValue = small;
xlargeValue = small;
}
if (medium != null) {
mediumValue = medium;
largeValue = medium;
xlargeValue = medium;
}
if (large != null) {
largeValue = large;
xlargeValue = large;
}
return ResponsiveValue(
allowNull: allowNull,
xsmall: xsmallValue,
small: smallValue,
medium: mediumValue,
large: largeValue,
xlarge: xlargeValue,
fallback: fallback,
);
}