bootstrapPrefixBasedOnWidth function

BCol bootstrapPrefixBasedOnWidth(
  1. double width
)

Returns the definition prefix, based on the available width

Implementation

BCol bootstrapPrefixBasedOnWidth(double width) {
  if (width > 1200) {
    return BCol.col12; // xl
  }
  if (width > 992) {
    return BCol.col10; // lg
  }
  if (width > 767) {
    return BCol.col8; // md
  }
  if (width > 575) {
    return BCol.col6; // sm
  }
  return BCol.col6; // xs
}