getValue method

T getValue(
  1. BuildContext context
)

Get value based on context

Implementation

T getValue(BuildContext context) {
  final width = MediaQuery.of(context).size.width;
  if (width >= Breakpoints.desktop && desktop != null) {
    return desktop!;
  } else if (width >= Breakpoints.mobile && tablet != null) {
    return tablet!;
  } else {
    return phone;
  }
}