'Flutter InkWell widget color not updating after Tap

I am having trouble coding a function. In my app, a quiz has been added, the quiz functionality works, the quiz data is retrieved from a server and delivered as JSON data. I have a problem where my app does not show whether a user's answer is correct or not when they select an answer but will only do so if the user leaves the screen and then returns. Using a function that returns a color, the correct and incorrect answers are presented. However, I am unsure what the problem is; how can I solve it?

I would like to provide the code but it is a lot, so you can find it here: https://github.com/BotsheloRamela/code

Most of the functionality can be found here in the main code: https://github.com/BotsheloRamela/code/blob/main/option.dart



Solution 1:[1]

If you're having trouble with that then make sure to do it so

Material(
child: InkWell(
child : Ink()));
// and populate this accordingly

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 YaDev