value property

Type get value

The Type value selected, depending on the screen or window size.

Implementation

Type get value {
  var settings = breakpoints ?? FluidoSettings.breakpoints;
  var width = MediaQuery.of(context).size.width;

  if (width < settings.sm) {
    return sm;
  } else if (width < settings.md) {
    return md ?? sm;
  } else if (width < settings.lg) {
    return lg ?? md ?? sm;
  } else if (width < settings.xl) {
    return xl ?? lg ?? md ?? sm;
  } else {
    return xl2 ?? xl ?? lg ?? md ?? sm;
  }
}