提交 b0d436a0 authored 作者: JarvanMo's avatar JarvanMo

ResponseType renamed to WeChatResponseType

上级 b69a7a19
......@@ -17,13 +17,13 @@ final MethodChannel _channel = const MethodChannel('com.jarvanmo/fluwx')
Future<dynamic> _handler(MethodCall methodCall) {
if ("onShareResponse" == methodCall.method) {
_responseController
.add(WeChatResponse(methodCall.arguments, ResponseType.SHARE));
.add(WeChatResponse(methodCall.arguments, WeChatResponseType.SHARE));
} else if ("onAuthResponse" == methodCall.method) {
_responseController
.add(WeChatResponse(methodCall.arguments, ResponseType.AUTH));
.add(WeChatResponse(methodCall.arguments, WeChatResponseType.AUTH));
} else if ("onPayResponse" == methodCall.method) {
_responseController
.add(WeChatResponse(methodCall.arguments, ResponseType.PAYMENT));
.add(WeChatResponse(methodCall.arguments, WeChatResponseType.PAYMENT));
}
return Future.value(true);
......
enum ResponseType { SHARE, AUTH, PAYMENT }
enum WeChatResponseType { SHARE, AUTH, PAYMENT }
/// response data from WeChat.
class WeChatResponse {
final Map result;
final ResponseType type;
final WeChatResponseType type;
WeChatResponse(this.result, this.type);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论