2021-03-18 00:55:38 +00:00
|
|
|
// part of 'services_cubit.dart';
|
2020-12-01 19:08:19 +00:00
|
|
|
|
2021-03-18 00:55:38 +00:00
|
|
|
// @immutable
|
|
|
|
// class ServicesState extends Equatable{
|
|
|
|
// ServicesState(this.all);
|
2020-12-01 19:08:19 +00:00
|
|
|
|
2021-03-18 00:55:38 +00:00
|
|
|
// final List<Service> all;
|
2020-12-01 19:08:19 +00:00
|
|
|
|
2021-03-18 00:55:38 +00:00
|
|
|
// ServicesState updateElement(Service service, StateType newState) {
|
|
|
|
// var newList = [...all];
|
|
|
|
// var index = newList.indexOf(service);
|
|
|
|
// newList[index] = service.updateState(newState);
|
|
|
|
// return ServicesState(newList);
|
|
|
|
// }
|
2020-12-01 19:08:19 +00:00
|
|
|
|
2021-03-18 00:55:38 +00:00
|
|
|
// List<Service> get connected => all
|
|
|
|
// .where((service) => service.state != StateType.uninitialized)
|
|
|
|
// .toList();
|
2020-12-01 19:08:19 +00:00
|
|
|
|
2021-03-18 00:55:38 +00:00
|
|
|
// List<Service> get uninitialized => all
|
|
|
|
// .where((service) => service.state == StateType.uninitialized)
|
|
|
|
// .toList();
|
2020-12-10 20:33:19 +00:00
|
|
|
|
2021-03-18 00:55:38 +00:00
|
|
|
// @override
|
|
|
|
// List<Object> get props => all;
|
|
|
|
// }
|