I run my application, but show this error. Before this i can run it. But now, It says "pr.dismiss is not defined in progress dialog." I have install package,and my code in flutter is not red colour but run it that got error in debug. So how i can solves this problem?
Asked
Active
Viewed 563 times
-1
-
show your code. because there is no dismiss method for progress dialog. – Harin Kaklotar Apr 05 '21 at 05:33
-
https://pastebin.com/TepnR9RR .This is my source code – Ula Lee Apr 05 '21 at 05:59
-
ok check my answer. and let me know if there is any confusion. – Harin Kaklotar Apr 05 '21 at 07:00
1 Answers
0
as per your source code you use https://pub.dev/packages/progress_dialog package for display progress dialog. so as per this package for dismiss dialog you need to use the below method.
pr.hide().then((isHidden) {
print(isHidden);
});
// or
await pr.hide();
So replace pr.dismiss() with the above method.

Harin Kaklotar
- 305
- 7
- 22
-
it means i need change all about pr.dismiss to pr.hide? why need change it ? – Ula Lee Apr 05 '21 at 07:43
-
-
-
from version 1.1.2 onward package removed the dismiss method and merged the functionality into hide method. – Harin Kaklotar Apr 05 '21 at 11:55
-
May i ask when running code ,they show error after doing change the pr.dismmis to pr.hide.A long list error ,i dont have idea abou this error.I already paste error here. https://pastebin.com/uAiY0fVG – Ula Lee Apr 05 '21 at 12:33
-
-
ok, When your app and the libraries it references exceed 65,536 methods, you encounter a build error that indicates your app has reached the limit of the Android build architecture. for that just add multidex dependency in your gradle file. for more information use this link : https://developer.android.com/studio/build/multidex and https://stackoverflow.com/questions/48249633/errorcannot-fit-requested-classes-in-a-single-dex-file-try-supplying-a-main-dex – Harin Kaklotar Apr 06 '21 at 05:33
-
Thanks i will try it .May I ask if run this application,i using camera and image.picker.My phone is become white page and debug says lost connection.What should i do? – Ula Lee Apr 06 '21 at 06:31
-
amm I can't say anything without scenario. just read your logcat/run so you get the idea and reconnect your device. If this answer solve your current problem then accept it so anyone have same problem then thay can refer this answer. :) – Harin Kaklotar Apr 06 '21 at 07:47
-
-