Bubble formation in saturated flow boiling in 2D microchannels, generated from a microheater under constant wall heat flux or constant wall temperature conditions, is studied numerically based on a newly developed lattice Boltzmann model for liquid-vapor phase change. Simulations are carried out to study effects of inlet velocity, contact angle, and heater size on saturated flow boiling of water under constant wall heat flux conditions. Important information, such as effects of static contact angle on nucleation time and nucleation temperature, which was unable to be obtained by other numerical simulation methods, is obtained. Furthermore, effects of inlet velocity, contact angle, and superheat on nucleate boiling heat transfer in steady flow boiling of water under constant wall temperature conditions are also presented. It is found that the nucleate boiling heat transfer at the microheater is higher if the heater surface is more hydrophilic, because the superheated vapor at the hydrophilic wall has a thinner thermal boundary layer and a larger thermal conductivity.