deviceFromType method

Device deviceFromType(
  1. DeviceType type
)

Implementation

Device deviceFromType(DeviceType type) {
  switch (type) {
    case DeviceType.watch:
      return watch;
    case DeviceType.mobile:
      return mobile;
    case DeviceType.tablet:
      return tablet;
    case DeviceType.laptop:
      return laptop;
    case DeviceType.desktop:
      return desktop;
    case DeviceType.tv:
      return tv;
  }
}