selfprivacy.org.app/lib/logic/cubit/providers/providers_cubit.dart
2022-05-24 21:55:39 +03:00

19 lines
583 B
Dart

import 'package:flutter_bloc/flutter_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> {
ProvidersCubit() : super(InitialProviderState());
void connect(ProviderModel provider) {
var newState = state.updateElement(provider, StateType.stable);
emit(newState);
}
}