The card model looks like this:
class Playcard {
Playcard({
required this.front,
required this.back,
required this.flipped,
});
final String front;
final String back;
bool flipped;
}
The board widget is showing the cards from the card widget.
The cards can be flipped. Initially all cards have flipped=false. When a card is flipped=true.
To show the card with the new value flipped=true should the board or the card be stateful?
I have created a card provider that sets the value of the card to true if it is flipped.