part of 'device_bloc.dart';

abstract class DeviceState extends Equatable {
  const DeviceState();

  @override
  List<Object> get props => [];
}

class DeviceInitial extends DeviceState {}

class DisplayDevice extends DeviceState {
  List<Device>? devices;
  bool? loading;
  String? msg;

  DisplayDevice({this.devices, this.loading, this.msg});

  factory DisplayDevice.loading() {
    return DisplayDevice(devices: null, loading: true, msg: null);
  }

  factory DisplayDevice.data(List<Device> data) {
    return DisplayDevice(devices: data, loading: false, msg: null);
  }

  factory DisplayDevice.error(String msg) {
    return DisplayDevice(devices: null, loading: false, msg: msg);
  }

  // @override
  // List<Object> get props => [devices, loading, msg];
}
