Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【紧急】Interceptor中无法使用showToast #15

Closed
Pluto1219 opened this issue Apr 25, 2020 · 1 comment
Closed

【紧急】Interceptor中无法使用showToast #15

Pluto1219 opened this issue Apr 25, 2020 · 1 comment

Comments

@Pluto1219
Copy link

class AdapterInterceptor extends InterceptorsWrapper{
@OverRide
onRequest(RequestOptions options) async {
return options;
}

@override
onResponse(Response response) {
	BaseEntity baseEntity = BaseEntity.fromJson(response.data);
	if (baseEntity.code == 0) {
	
		return http.resolve(response.data);
	} else {
                    EasyLoading.showToast(
		 msg,
	      )
	}
}

}

@Pluto1219
Copy link
Author

无报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant