csells / flutter_ai_toolkit

A set of AI chat-related widgets for Flutter
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
33 stars 6 forks source link

fixed #51 : Click on an image to get a preview #56

Closed Shashwat-111 closed 1 month ago

Shashwat-111 commented 1 month ago

https://github.com/user-attachments/assets/26b2b4dc-c1c3-43f7-b442-99229e87759d

https://github.com/user-attachments/assets/f4bee9b0-d186-4e57-b39e-10156be44359

csells commented 1 month ago

excellent work @Shashwat-111. thank you very much.

csells commented 1 month ago

I did some minor refactoring. tell me what you think.

Shashwat-111 commented 1 month ago

I am new to open source, so any feedback is much appreciated!

As I see from your refactor, is it better to create a separate class for dialogs rather than using top-level functions?

csells commented 1 month ago

The dialog class I found to be useful but it's a matter of personal taste. I tend to not like to make functions globally available (again, personal taste).

The bigger refactor was the addition of the _ImageAttachmentView as a parallel to _FileAttachmentView. I think the code came out a tiny bit easier to read doing that.

In general, however, your code was clean and worked great. No errors or warnings and all of the functionality was perfect. Thank you!