-1

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?

I RUN THIS GOT PROBLEM

Ula Lee
  • 13
  • 4

1 Answers1

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
  • because the package you use has pr.hide method not pr.dismiss – Harin Kaklotar Apr 05 '21 at 11:31
  • ok but why my existing project that can use it the pr.dismiss()? – Ula Lee Apr 05 '21 at 11:47
  • 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
  • @ HarinKaklotar – Ula Lee Apr 06 '21 at 02: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
  • run but debug says lost connection. So not idea whats going on..== – Ula Lee Apr 06 '21 at 08:48
  • check on emulator – Harin Kaklotar Apr 07 '21 at 07:28