ResponsiveVariable<T> constructor
const
ResponsiveVariable<T> ({
- required T mobile,
- required T tablet,
- required T laptop,
- required T desktop,
- required T widescreen,
ResponsiveVariable
mobileis the value applied for ScreenType.mobile.tabletis the value applied for ScreenType.tablet.laptopis the value applied for ScreenType.laptop.desktopis the value applied for ScreenType.desktop.widescreenis the value applied for ScreenType.widescreen.
Note that you can only provide simple types T
or non parameterized default constructors as custom type T.
Parametrized and/or named constructors are not supported yet.
Implementation
const ResponsiveVariable({
required this.mobile,
required this.tablet,
required this.laptop,
required this.desktop,
required this.widescreen,
}) : type = T,
assert(mobile != null),
assert(tablet != null),
assert(laptop != null),
assert(desktop != null),
assert(widescreen != null);