selfprivacy.org.app/lib/logic/cubit/providers/providers_cubit.dart

21 lines
569 B
Dart
Raw Normal View History

2020-12-10 20:33:19 +00:00
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:selfprivacy/logic/models/provider.dart';
import 'package:selfprivacy/logic/models/state_types.dart';
export 'package:selfprivacy/logic/models/state_types.dart';
export 'package:provider/provider.dart';
part 'providers_state.dart';
class ProvidersCubit extends Cubit<ProvidersState> {
2020-12-30 14:13:25 +00:00
ProvidersCubit() : super(InitialProviderState());
2020-12-10 20:33:19 +00:00
void connect(ProviderModel provider) {
var newState = state.updateElement(provider, StateType.stable);
emit(newState);
}
}
2020-12-30 14:13:25 +00:00