title: Flutter update UI from native method call by using setState() method
body: <p>I am invoking a method from native Android code by using the platform channel like this:</p>
  
  <p><code>MethodChannel(flutterView, CHANNEL).invokeMethod(METHOD_NAME, null)</code></p>
  
  <p>in my Flutter class I handle the respective method call by using a callback
  <code>platform.setMethodCallHandler(_handleNativeMethodCall)</code></p>
  
  <p>The <code>setMethodCallHandler()</code> requires the callback to return a <code>Future</code>. But here comes the problem, I want to update my UI when the native code invokes the callback, so I want to use the <code>setState()</code> methode. The problem now is, that <code>setState()</code> doesn't allow to be called within a async function e.g. a function that returns a <code>Future</code> and therefore not in the callback for the native method invocation.</p>
  
  <p>Does anyone of you faced this problem and may got a solution for this? It would be ridiculous if updating the UI from this callback wouldn't be possible.</p>