Chapter 6: Creating a grocery tile, below comment //4 : textDecoration = item.isComplete?

Hello, its my first time commenting in here! :slight_smile:
I have an issue with
Key? key,
required this.item,
}) : textDecoration = item.isComplete ? TextDecoration.lineThrough : TextDecoration.none, super(key: key);

in the item.isComplete part, there is an error like “invalid Constant value”.
But, i could not find the source of this, please help me :frowning:

@oyuka have you tried removing the const from GroceryTile constructor?

@jomoka Thank you very much! I did not notice that.
You saved me :).

1 Like