Commit 426ccd34 by 魏春生 Committed by GitHub

bug fix (Toast invisable on huawei honor device )

parent a54ccc30
......@@ -92,7 +92,16 @@ public class FluttertoastPlugin implements MethodCallHandler {
} else {
mToast.setGravity(mGravity, 0, 100);
}
mToast.show();
if (mContext instanceof Activity) {
((Activity) mContext).runOnUiThread(new Runnable() {
@Override
public void run() {
mToast.show();
}
});
} else {
mToast.show();
}
result.success(true);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment