Go to settings. Enable cheat codes. A flask will appear at the locations in the upper right. Enter the cheat code there.