These tests are done with the gate driven by constant voltage through a resistor, so gate current depends on Vgs and gate resistor. During the time when Vgs is constant, then voltage across the gate resistor is constant, so gate current is also constant.
So, why is the gate voltage flat during switching?...

I've drawn C2, and made it much larger than the MOSFET's Cds, to make the gate-drain capacitance explicit.
So, this begins with the FET in the OFF state, so v(out)=Vds is equal to the supply voltage, and load current is zero. When the driver applies a voltage pulse to the gate resistor, first gate voltage rises to about 3V, at this point the FET turns on.
When it turns on, it runs in linear mode. It isn't fully ON yet, so this is not about RdsON, rather it runs as a common source amplifier, with feedback through C2.
So if we push positive current through the gate resistor R7, Vds increases, which turns on the MOSFET a bit more, so it increases its drain current. This lowers Vds, which causes current to flow through C2 in the opposite direction of the current through the gate resistor. This is negative feedback, and these two currents cancel each other. So if we want Vds to move, we have to push charge C2, which we do by pushing current through the gate resistor.

So what we have is just the same thing as an opamp wired as in integrator, the "-" input of the opamp which brings output voltage down is the gate, and the opamp's output is the drain. The difference is the MOSFET is a transconductance device, so it has a current output, while the opamp has a voltage output, but you get the idea.
During this "integrator" phase, Vgs is pretty constant, and Vds moves.
Once the FET is fully on, it no longer works in linear mode, it's just a resistor, so this feedback system turns off, and we have the next phase of the turn-on which is just charging Cgs and Cds while Vds doesn't move. So, the gate is just a capacitor charged by the driver through the gate resistor which gives an exponential voltage rise just like any RC circuit.