How do I disable Animation?

Right now I have “flicker” as animation. I want to disable it until certain condition is met. I’ve been looking around for good few hours but all I found are outdated. How do I do this in Unity 5? (c# preferred)

Create Empty State in Animator window and set it to Default State.

Then create transition from this state to your animation state.

Also don’t forget to create parametr at up-left side in Animator. And set this parametr as condition in your newly created transition.

Now, you can change this parametr in script.