1540s, "flap about loosely," probably a later variant of Middle English flakken, flacken "to flap, flutter" (late 14c.), which probably is from Old Norse flaka "to flicker, flutter, hang loose," itself perhaps imitative of something flapping lazily in the wind. The sense of "go limp, droop, become languid" is attested by 1610s. Related: Flagged; flagging.
"Of somewhat doubtful etymology" [OED]. Liberman calls it "one of many imitative verbs beginning with fl- and denoting unsteady or light, repeated movement" (for example flicker, flutter). If it is related to flat the notion could be either "caress with the flat of the hand, stroke, pet," or "throw oneself flat on the ground" (in fawning adoration). The -er ending is unusual for an English verb from French; perhaps it is by influence of shimmer, flicker, etc., or from flattery.
Meaning "give a pleasing but false impression to" is from late 14c. Sense of "show (something) to best advantage" is from 1580s, originally of portraits. Related: Flattered; flattering.