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

How can I access the input parameter when the error is thrown? #42

Closed
hasimyerlikaya opened this issue Jun 21, 2020 · 4 comments
Closed

Comments

@hasimyerlikaya
Copy link

I'am big fan of RxCommand.
I think best state management solution is RxVMS for flutter.

My architecture of last three project is based on RXCommand.
I growup my architecture with every project.

In my last project, I use AnimatedListWidget.
When user tap the delete button, I sending request to the server and then I switch widget status as loading.
After server responsed, I am switch widget status to normal.

When an error thrown in RxCommand, I must change widget status to normal or error. For this, I must access TParam of RxCommand in "thrownExceptions". I will take TParam object and than switch AnimatedList item with that.

Can you add TParam in thrownExceptions return value.

image

image

@escamoteur
Copy link
Collaborator

would it be enough if I included TParam Value in CommandResults?
Otherwise I would have to change to Type of thrownExeptions to some ErrorState object which would be a breaking change.

@hasimyerlikaya
Copy link
Author

Frankly, I almost never felt the need to use CommandResults.

So frankly it doesn't work for me.
I sent a Pull Request for an arrangement on this.
If you can review that arrangement, we will not need to make this change if appropriate.

First of all I ask you to check the pull request.

@escamoteur
Copy link
Collaborator

Just for your information, in my new command package flutter_command I implemented your wish.

@hasimyerlikaya
Copy link
Author

@escamoteur Thank you. I am checking flutter_command now.

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

2 participants