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

[ai_recipe_generation] Unsupported operation: removeAt #2301

Closed
chihau opened this issue May 24, 2024 · 2 comments · Fixed by #2310
Closed

[ai_recipe_generation] Unsupported operation: removeAt #2301

chihau opened this issue May 24, 2024 · 2 comments · Fixed by #2310

Comments

@chihau
Copy link

chihau commented May 24, 2024

This is a bug from ai_recipe_generation presented at Google I/O 2024

When you press Submit Prompt button the IconLoadingAnimator show an error: Unsupported operation: removeAt

Captura de pantalla 2024-05-24 a la(s) 10 03 09 a  m

This error occurs because it's trying to remove an element from a constant list

currentIcon = notYetSeenIcons.removeAt(rand.nextInt(notYetSeenIcons.length));

child: IconLoadingAnimator( icons: const [ Symbols.icecream, Symbols.local_pizza, Symbols.restaurant_menu, Symbols.egg, Symbols.bakery_dining, Symbols.skillet, Symbols.nutrition, Symbols.grocery, Symbols.set_meal, Icons.egg_alt, Symbols.oven, Icons.dinner_dining, Icons.outdoor_grill, Icons.cookie, Icons.blender, Symbols.stockpot, ], ),

cc: @domesticmouse @ericwindmill

@chihau
Copy link
Author

chihau commented May 24, 2024

PR #2302

@ericwindmill ericwindmill mentioned this issue May 29, 2024
domesticmouse added a commit that referenced this issue May 29, 2024
Fixes #2301

---------

Co-authored-by: Brett Morgan <brett.morgan@gmail.com>
Co-authored-by: Brett Morgan <brettmorgan@google.com>
@chihau
Copy link
Author

chihau commented May 30, 2024

Thanks!

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

Successfully merging a pull request may close this issue.

1 participant