DeviceFrameAddon constructor

DeviceFrameAddon({
  1. required List<DeviceInfo> devices,
  2. DeviceInfo initialDevice = NoneDevice.instance,
})

Implementation

DeviceFrameAddon({
  required List<DeviceInfo> devices,
  this.initialDevice = NoneDevice.instance,
})  : assert(
        devices.isNotEmpty,
        'devices cannot be empty',
      ),
      assert(
        initialDevice == NoneDevice.instance ||
            devices.contains(initialDevice),
        'initialDevice must be in devices',
      ),
      this.devices = [NoneDevice.instance, ...devices],
      super(
        name: 'Device',
      );