value<T> static method
Adatively provides the assign type with the correct element based on the current breakpoint {@tool snippet}
Here are some examples of how to create Bamboo.value instances:
Mostly, you may need to pass only mobile and large:
BamboomResponsive.value(
context: context,
mobile: Colors.amberAccent,
desktop: Colors.pink,
tablet: Colors.black,
)
{@end-tool} {@tool snippet} If any of the value non-required value is set to null it will take the mobile breakpoint as default See also:
Implementation
static T value<T>({
required BuildContext context,
required T mobile,
T? tablet,
T? desktop,
T? large,
}) {
return Bamboo<T>(
mobile: mobile,
tablet: tablet,
desktop: desktop,
context: context,
large: large,
unit: Unit.px,
).adaptive;
}