import 'package:flutter_bloc/flutter_bloc.dart';

import '../api/api.dart';

class VoucherCheck extends Cubit<List<dynamic>> {
  VoucherCheck() : super(['0']); // default list pertama String 0

  void check(String codeVoucher) async {
    var voucherDetail = await Api.checkVoucher(codeVoucher);
    emit(voucherDetail);
  }

  void changeVoucher() {
    emit(['0']);
  }
}
