import 'package:bloc/bloc.dart';
import 'package:e_commerce_training/src/model/repository/app_repository.dart';
import 'package:meta/meta.dart';

part 'rate_product_state.dart';

class RateProductCubit extends Cubit<RateProductState> {
  final AppRepository repository;
  RateProductCubit(this.repository) : super(RateProductInitial());
  int rating  = 1;
  bool isCheck = false;
  int index= 0;
  void changeRating(int number) {
    emit(RateProductLoading());
    this.rating = number;
    emit(RateProductInitial());
  }

  void changeButton() {
    emit(RateProductLoading());
    this.isCheck = !isCheck;
    emit(RateProductInitial());
  }
}
