Flutter-Progress-Dialog icon indicating copy to clipboard operation
Flutter-Progress-Dialog copied to clipboard

Try correcting the name to the name of an existing method, or defining a method named 'PopScope'.

Open Mamasodikov opened this issue 1 year ago • 8 comments

Error:

sn_progress_dialog: ^1.1.4

../../.pub-cache/hosted/pub.dev/sn_progress_dialog-1.1.4/lib/progress_dialog.dart:161:29: Error: The method 'PopScope' isn't defined for the class 'ProgressDialog'.
 - 'ProgressDialog' is from 'package:sn_progress_dialog/progress_dialog.dart' ('../../.pub-cache/hosted/pub.dev/sn_progress_dialog-1.1.4/lib/progress_dialog.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PopScope'.
      builder: (context) => PopScope(

Mamasodikov avatar Mar 12 '24 06:03 Mamasodikov

Which flutter version are you using ?

emreesen27 avatar Mar 12 '24 07:03 emreesen27

Which flutter version are you using ?

[✓] Flutter (Channel stable, 3.13.1, on macOS 14.2.1 23C71 darwin-arm64, locale en-UZ) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.85.1)

Mamasodikov avatar Mar 12 '24 08:03 Mamasodikov

You might be trying to compile the project in a version lower than your current Flutter version. Check the SDK version you are using

  environment:
  sdk: '>=3.2.5 <4.0.0' 

You may be experiencing a cache issue, try clearing it.

flutter clean

And now upgrade the library

flutter pub upgrade sn_progress_dialog

If you continue to experience issues, you can try upgrading your Flutter version.

emreesen27 avatar Mar 12 '24 11:03 emreesen27

You might be trying to compile the project in a version lower than your current Flutter version. Check the SDK version you are using

  environment:
  sdk: '>=3.2.5 <4.0.0' 

You may be experiencing a cache issue, try clearing it.

flutter clean

And now upgrade the library

flutter pub upgrade sn_progress_dialog

If you continue to experience issues, you can try upgrading your Flutter version.

Nothing worked till I downgraded package to 1.1.3

Mamasodikov avatar Mar 13 '24 07:03 Mamasodikov

Did you get any solution of this error????

tariqarbi03 avatar Mar 25 '24 15:03 tariqarbi03

Did you get any solution of this error????

I'm still using 1.1.3

Mamasodikov avatar Mar 25 '24 15:03 Mamasodikov

Hello, I would like to know how to point to the link in 1.1.3. I am unable to downgrade it in pubsoec.ymal. How did you point to 1.1.3

xuxiaoyu123 avatar Mar 28 '24 10:03 xuxiaoyu123

Hello, I would like to know how to point to the link in 1.1.3. I am unable to downgrade it in pubsoec.ymal. How did you point to 1.1.3

Copy source code, change PopScope to WillPopScope ... because flutter version has no PopScope

yw-forGit avatar Apr 10 '24 11:04 yw-forGit