Commit 9d283af7 by Caijinglong

the android toast use single instance

parent 1dd40fb3
...@@ -46,6 +46,7 @@ class FluttertoastPlugin(context: Context): MethodCallHandler { ...@@ -46,6 +46,7 @@ class FluttertoastPlugin(context: Context): MethodCallHandler {
val toast: Toast = this.toast?:Toast.makeText(ctx, msg, Toast.LENGTH_SHORT); val toast: Toast = this.toast?:Toast.makeText(ctx, msg, Toast.LENGTH_SHORT);
this.toast = toast this.toast = toast
toast.text = msg;
if(length.equals("long")) { if(length.equals("long")) {
toast.duration = Toast.LENGTH_LONG toast.duration = Toast.LENGTH_LONG
} else { } else {
......
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