selfprivacy.org.app/lib/logic/models/service.dart

26 lines
501 B
Dart
Raw Normal View History

2020-12-01 19:08:19 +00:00
import 'package:equatable/equatable.dart';
2020-12-10 20:33:19 +00:00
import 'package:selfprivacy/logic/models/state_types.dart';
2020-12-01 19:08:19 +00:00
enum ServiceTypes {
messanger,
mail,
passwordManager,
github,
cloud,
}
class Service extends Equatable {
2021-03-15 15:39:44 +00:00
const Service({required this.state, required this.type});
2020-12-01 19:08:19 +00:00
2020-12-10 20:33:19 +00:00
final StateType state;
2020-12-01 19:08:19 +00:00
final ServiceTypes type;
2020-12-10 20:33:19 +00:00
Service updateState(StateType newState) => Service(
2020-12-01 19:08:19 +00:00
state: newState,
type: type,
);
@override
2021-03-15 15:39:44 +00:00
List<Object?> get props => [state, type];
2020-12-01 19:08:19 +00:00
}