between method

bool between(
  1. DeviceType start,
  2. DeviceType end
)

Returns true if the screen is between two device types (inclusive).

Implementation

bool between(DeviceType start, DeviceType end) {
  final currentIndex = deviceType.index;
  return currentIndex >= start.index && currentIndex <= end.index;
}