Not sure I agree with idea of retracting flaps on landing.
Fully deployed flaps will cause drag, reducing airspeed, not adding lift. If you're getting lift with flaps, your deflection is not far down enough.
After the mains touch the ground, you want drag from the flaps to reduce airspeed so your tail will drop toward the ground.
Reducing flaps at this point is doing the opposite of the result you're looking for. You want more drag as soon as you touch the ground.
If you notice jets on landing, they have full flaps deployed and as soon as they touch down and keep them deployed until complete stop. They even deploy airbrakes on the wings to maximize drag. I've never seen any full scale plane reduce flaps on touch down.