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

Api and flutterwave #288

Open
andymaking opened this issue Apr 11, 2022 · 0 comments
Open

Api and flutterwave #288

andymaking opened this issue Apr 11, 2022 · 0 comments

Comments

@andymaking
Copy link

How can i pass the response to an Api

flutterResponse is my data class

@deprecated("Deprecated in Java")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: FlutterResponse) {
viewModel = ViewModelProvider(this)[SignUpActivityViewModel::class.java]
if (requestCode == RaveConstants.RAVE_REQUEST_CODE) {
viewModel.signup(data)
val message = data.message;
when (resultCode) {
RavePayActivity.RESULT_SUCCESS -> {
resultPay = resultCode
Toast.makeText(this, "SUCCESS", Toast.LENGTH_LONG).show()
}
RavePayActivity.RESULT_ERROR -> {
resultPay = resultCode
Toast.makeText(this, "ERROR", Toast.LENGTH_SHORT).show()
}
RavePayActivity.RESULT_CANCELLED -> {
resultPay = resultCode
Toast.makeText(this, "CANCELLED", Toast.LENGTH_SHORT).show()
}
}
} else {
super.onActivityResult(requestCode, resultCode, data)
}
}

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