title: While Scanning available wifi getting exception - java.lang.IllegalStateException: Reply already submitted
body: <p>While I am requesting for the available wifi list in the network using <a href="https://pub.dev/packages/wifi" rel="nofollow noreferrer">wifi</a> getting below exception.</p>
  
  <p><strong>Exception</strong>:</p>
  
  <pre><code>E/MethodChannel#plugins.ly.com/wifi(29023): Failed to handle method call
  E/MethodChannel#plugins.ly.com/wifi(29023): java.lang.IllegalStateException: Reply already submitted
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:151)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.finishWithError(WifiDelegate.java:341)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.finishWithAlreadyActiveError(WifiDelegate.java:337)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.getWifiList(WifiDelegate.java:172)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiPlugin.onMethodCall(WifiPlugin.java:58)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.MessageQueue.nativePollOnce(Native Method)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.MessageQueue.next(MessageQueue.java:336)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.Looper.loop(Looper.java:174)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.app.ActivityThread.main(ActivityThread.java:7356)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at java.lang.reflect.Method.invoke(Native Method)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  I/flutter (29023): PlatformException(error, Reply already submitted, null)
  E/MethodChannel#plugins.ly.com/wifi(29023): Failed to handle method call
  E/MethodChannel#plugins.ly.com/wifi(29023): java.lang.IllegalStateException: Reply already submitted
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:151)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.finishWithError(WifiDelegate.java:341)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.finishWithAlreadyActiveError(WifiDelegate.java:337)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.getWifiList(WifiDelegate.java:172)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiPlugin.onMethodCall(WifiPlugin.java:58)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.MessageQueue.nativePollOnce(Native Method)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.MessageQueue.next(MessageQueue.java:336)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.Looper.loop(Looper.java:174)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.app.ActivityThread.main(ActivityThread.java:7356)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at java.lang.reflect.Method.invoke(Native Method)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  I/flutter (29023): PlatformException(error, Reply already submitted, null)
  E/MethodChannel#plugins.ly.com/wifi(29023): Failed to handle method call
  E/MethodChannel#plugins.ly.com/wifi(29023): java.lang.IllegalStateException: Reply already submitted
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:151)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.finishWithError(WifiDelegate.java:341)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.finishWithAlreadyActiveError(WifiDelegate.java:337)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiDelegate.getWifiList(WifiDelegate.java:172)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.ly.wifi.WifiPlugin.onMethodCall(WifiPlugin.java:58)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.MessageQueue.nativePollOnce(Native Method)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.MessageQueue.next(MessageQueue.java:336)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.os.Looper.loop(Looper.java:174)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at android.app.ActivityThread.main(ActivityThread.java:7356)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at java.lang.reflect.Method.invoke(Native Method)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  E/MethodChannel#plugins.ly.com/wifi(29023):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  I/flutter (29023): PlatformException(error, Reply already submitted, null)
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>Future&lt;List&lt;WifiResult&gt;&gt; getAvailableWifi() async {
  List&lt;WifiResult&gt; filteredList = [];
  bool match = true;
  
  return Wifi.list('');
  List&lt;WifiResult&gt; wifis =  await Wifi.list('');
  return wifis;
  }
  </code></pre>