event.dart
717 Bytes
import 'package:wow_english/models/product_entity.dart';
import 'bloc.dart';
abstract class ShoppingEvent {}
class InitEvent extends ShoppingEvent {}
class ChangePaymentChannelEvent extends ShoppingEvent {
final PaymentChannel paymentChannel;
ChangePaymentChannelEvent(this.paymentChannel);
}
class DoPayEvent extends ShoppingEvent {
final ProductEntity? productEntity;
final PaymentChannel paymentChannel;
DoPayEvent(this.productEntity, this.paymentChannel);
}
// 微信由于是异步回调方式通知支付状态,在异步回调里emitter(PaySuccessState())时报错
// !_isCompleted emit was called after an event handler completed normally
class WxPaySuccessEvent extends ShoppingEvent {}