Java.lang.illegalstateexception reply already submitted flutter

Using method channels Communicating between android and Flutter i’m facing this issue.
First time it is working fine but second it is crashing by showing this issue(java.lang.illegalstateexception reply already submitted)

Please help me

This is generally the exception to throw if the invocation is illegal because of the state of the receiving object. It signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation. for ex. , in case of java.util.List collection, we use next() method of the ListIterator interface to traverse through the java.util.List. If we call the remove() method of the ListIterator interface before calling the next() method then this exception will be thrown as it will leave the List collection in an unstable state.

1 Like

Please follow the below solution :