If you make a checkmating move before your flag falls, but then your flag falls before you press the clock, you win. The relevant FIDE rules (emphasis mine) are:
5.1.a. The game is won by the player who has checkmated his opponent’s king. This immediately ends the game, provided that the move producing the checkmate position was in accordance with Article 3 and Articles 4.2 – 4.7.
6.2.a. During the game each player, having made his move on the chessboard, shall stop his own clock and start his opponent’s clock (that is to say, he shall press his clock). This “completes” the move. A move is also completed if the move ends the game (see Articles 5.1.a, 5.2.a, 5.2.b, 5.2.c, 9.6a, 9.6b and 9.7).
6.3.a. When using a chessclock, each player must complete a minimum number of moves or all moves in an allotted period of time.
6.9 Except where one of Articles 5.1.a, 5.1.b, 5.2.a, 5.2.b, 5.2.c applies, if a player does not complete the prescribed number of moves in the allotted time, the game is lost by that player.