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

Android Studio don't shows option to convert StatelessWidget into ConsumerWidget #3769

Open
Tananga opened this issue Oct 8, 2024 · 10 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@Tananga
Copy link

Tananga commented Oct 8, 2024

https://raw.githubusercontent.com/rrousselGit/riverpod/master/packages/riverpod_lint/resources/convert_to_consumer_widget.gif
Im using Android Studio Ladybug | 2024.2.1

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.1, on macOS 14.5 23F79 darwin-arm64, locale
en-PL)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Community Edition (version 2024.2.3)
[✓] VS Code (version 1.94.0)
[✓] Connected device (6 available)
[✓] Network resources

• No issues found!

Before I was able to convert Flutter widgets into Riverpod widgets but now I cant. If anyone know how to fix this issue please put a comment below.

@Tananga Tananga added bug Something isn't working needs triage labels Oct 8, 2024
@rrousselGit
Copy link
Owner

Could you make a git project to reproduce the issue?

@rrousselGit rrousselGit added question Further information is requested and removed needs triage labels Oct 8, 2024
@Tananga
Copy link
Author

Tananga commented Oct 8, 2024

@rrousselGit Please take a look on this video https://youtu.be/bLttZ6tOYLQ?si=UMP034zifqkXl946

@Tananga
Copy link
Author

Tananga commented Oct 8, 2024

@rrousselGit There is an option to create ConsumerWidget from snippet. There is just no option to create Consumer widget from StatlessWidget. Very little problem and I dont think that its worth your time. Let me know If I can close this issue

Screenshot 2024-10-08 at 21 58 25

@rrousselGit
Copy link
Owner

I don't want a video. I want a github repository. I can't run a video :)

@mark8044
Copy link

I always manually do this, but this is a great idea and would be very useful for those new to riverpod.

@mdddj
Copy link

mdddj commented Oct 23, 2024

I have created a plugin to complete this operation, search flutterx
image

Kapture 2024-10-23 at 10 32 44

@MohammadNezarAldalati
Copy link

  • @rrousselGit this is a public repo, if you may check.
  • I have the issue with android studio that assits not shown.

my device info:

  1. Android Studio (version 2024.2)
  2. Flutter version 3.24.3
  3. Dart version 3.5.3
  4. DevTools version 2.37.3

@mtrfnvwork
Copy link

I have created a plugin to complete this operation, search flutterx image

Kapture 2024-10-23 at 10 32 44 Kapture 2024-10-23 at 10 32 44

How to activate that? I've installed the plugin, but I don't see any options to convert StatelessWidget to ConsumerWidget. Riverpod class tool is activated in Android Studio settings. I use the last stable version of Android Studio and FlutterX plugin

@mtrfnvwork
Copy link

The development process has become much slower without the ability to convert widgets

@mdddj
Copy link

mdddj commented Oct 28, 2024

How to activate that? I've installed the plugin, but I don't see any options to convert StatelessWidget to ConsumerWidget. Riverpod class tool is activated in Android Studio settings. I use the last stable version of Android Studio and FlutterX plugin

Try again after adding hooks_riverpod: ^2.6.1 to your pubspec.yaml. You may need to restart your Android Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants