agile_pay_state_info.dart 592 B

123456789101112131415161718192021222324252627282930313233
  1. import '../listener/agile_pay_state.dart';
  2. abstract class AgilePayStateInfo {
  3. AgilePayState? mPay;
  4. void sendError(int errno, String? error) {
  5. if (mPay != null) {
  6. mPay?.error(errno, error);
  7. }
  8. }
  9. void sendPaySuccess(String? result) {
  10. if (mPay != null) {
  11. mPay?.paySuccess(result);
  12. }
  13. }
  14. void sendPayError(int errno, String? error) {
  15. if (mPay != null) {
  16. mPay?.payError(errno, error);
  17. }
  18. }
  19. void sendPayBefore() {
  20. if (mPay != null) {
  21. mPay?.payBefore();
  22. }
  23. }
  24. void setPayListener(AgilePayState pay) {
  25. mPay = pay;
  26. }
  27. }