RespValue<T>.builder constructor
RespValue<T>.builder (
- BuildContext context, {
- RespValueBuilder<
T> ? xs, - RespValueBuilder<
T> ? sm, - RespValueBuilder<
T> ? md, - RespValueBuilder<
T> ? lg, - RespValueBuilder<
T> ? xl, - RespValueBuilder<
T> ? xxl, - Map<
String, RespValueBuilder< ? others,T> > - dynamic common,
A builder that allows users to use builder pattern to create a responsive value. This will also allow the users to have a common value for all breakpoints that can be accessed using the parameter 'common' of the builder.
Implementation
RespValue.builder(
this.context, {
RespValueBuilder<T>? xs,
RespValueBuilder<T>? sm,
RespValueBuilder<T>? md,
RespValueBuilder<T>? lg,
RespValueBuilder<T>? xl,
RespValueBuilder<T>? xxl,
Map<String, RespValueBuilder<T>>? others,
dynamic common,
}) : xs = xs?.call(common),
sm = sm?.call(common),
md = md?.call(common),
lg = lg?.call(common),
xl = xl?.call(common),
xxl = xxl?.call(common),
others = others?.map((key, value) => MapEntry(key, value(common)));