The invention relates to a flow sensor comprising a check valve, which is arranged in a fluid line and has a valve seat and a closure element, and a magnetic field sensor. The closure element comprises a magnetic field generator or is mechanically coupled to a magnetic field generator such that a movement of the closure element relative to the valve seat results in a movement of the magnetic field generator relative to the magnetic field sensor. The magnetic field sensor is arranged so as to detect a movement of the magnetic field generator relative to the magnetic field sensor such that an output signal of the magnetic field sensor is a measure of the opening degree of the check valve.