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

Restaurant_card #1311

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Restaurant_card #1311

wants to merge 3 commits into from

Conversation

clarapbsousa
Copy link
Contributor

@clarapbsousa clarapbsousa commented Sep 2, 2024

Closes #1274
Created new Restaurante card, with all the options

Review checklist

  • Terms and conditions reflect the current change
  • Contains enough appropriate tests
  • If aimed at production, writes a new summary in whatsnew/whatsnew-pt-PT
  • Properly adds an entry in changelog.md with the change
  • If PR includes UI updates/additions, its description has screenshots
  • Behavior is as expected
  • Clean, well-structured code

Establishments and meals

Captura de ecrã 2024-09-02, às 18 10 44

Favourite

Captura de ecrã 2024-09-02, às 18 10 56

Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 12%. Comparing base (7ca8cab) to head (da8e0fc).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #1311   +/-   ##
=======================================
  Coverage       12%     12%           
=======================================
  Files          266     266           
  Lines         7194    7194           
=======================================
  Hits           802     802           
  Misses        6392    6392           

Copy link
Member

@thePeras thePeras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design looks like the Figma one! Just an important thing below

Comment on lines +28 to +37
class _RestaurantCardState extends State<RestaurantCard> {
bool isFavorite = false;

void _toggleFavorite() {
setState(() {
isFavorite = !isFavorite;
});
}

IconData? _getIconForMenuItemType(String type) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extend a StatelessWidget instead.
The isFavorite state should be outside this widget and passed as a simple boolean argument. Also add the possibility to pass void function to run on favorite icon click.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okok! I'll fix that 😊

Comment on lines +48 to +50
Color _getIconColorForMenuItemType(String type) {
return Theme.of(context).colorScheme.primary;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a little redundant. I would remove that and put the theme property directly on line 116.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense !!

@DGoiana
Copy link
Collaborator

DGoiana commented Sep 11, 2024

Change the color of the text to black;
Change icon type to dual tone;
Change the heart icon to a rounded one;

@DGoiana
Copy link
Collaborator

DGoiana commented Oct 16, 2024

@clarapbsousa can you take a look into this?

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 this pull request may close these issues.

Restaurant Card
3 participants