LCOV - code coverage report
Current view: | top level - src/providers - device_state.dart (source / functions) |  |  | Hit | Total | Coverage
Test: | lcov.info |  | Lines: | 8 | 8 | 100.0 %
Date: | 2021-10-11 06:57:03 |  | Functions: | 0 | 0 | -

              Line data    Source code
           1             : import 'package:collection/collection.dart';
           2             :
           3             : import 'package:widgetbook/src/models/device.dart';
           4             :
           5             : class DeviceState {
           6           2 :   DeviceState({
           7             :     required this.availableDevices,
           8             :     required this.currentDevice,
           9             :   });
          10             :
          11             :   final List<Device> availableDevices;
          12             :   final Device currentDevice;
          13             :
          14           2 :   @override
          15             :   bool operator ==(Object other) {
          16             :     if (identical(this, other)) return true;
          17           2 :     final listEquals = const DeepCollectionEquality().equals;
          18             :
          19           2 :     return other is DeviceState &&
          20           4 :         listEquals(other.availableDevices, availableDevices) &&
          21           6 :         other.currentDevice == currentDevice;
          22             :   }
          23             :
          24           1 :   @override
          25           5 :   int get hashCode => availableDevices.hashCode ^ currentDevice.hashCode;
          26             : }

Generated by: LCOV version 1.15