Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mamasodikov opened this issue Mar 12, 2024 · 8 comments

Comments

@Mamasodikov
Copy link

Mamasodikov commented Mar 12, 2024

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(
@emreesen27
Copy link
Owner

Which flutter version are you using ?

@Mamasodikov
Copy link
Author

Mamasodikov commented Mar 12, 2024

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)

@emreesen27
Copy link
Owner

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.

@Mamasodikov
Copy link
Author

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

@tariqarbi03
Copy link

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

@Mamasodikov
Copy link
Author

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

I'm still using 1.1.3

@xuxiaoyu123
Copy link

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

@yw-forGit
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants