InputManager only while held down?

I’m trying to get it so that the gravity is set to 0 when the player holds the Fly key and back to normal when it is released. my code is

// the fly state needs to read here to make sure it is not missed
if (!m_Flying)
{
m_Flying = CrossPlatformInputManager.GetButtonDown(“Fly”);
}

if (m_Flying)
{

m_GravityMultiplier = 0;

}

This is in the FirstPersonController. I think this is a nooby question (i just started coding) but does anyone know how to do this?

m_Flying = CrossPlatformInputManager.GetButtonDown("Fly");
          
if (m_Flying) {
    m_GravityMultiplier = 0;         
} else  {
    m_GravityMultiplier = 1;
}

Ah thank you! Suspected it was something stupid i wasnt doing