If you resign and will have left the job before you start maternity leave, you won't be entitled to SMP from that employer.
You might be able to claim Maternity Allowance but it depends on your circumstances - I'd suggest looking here for more info, they have an online calculator you can use to calculate what you'd be entitled to https://www.gov.uk/maternity-allowance/eligibility
Once you qualify then it would be paid even if you left the job afterwards. You have to have been employed for 26 weeks by the time you are 25 weeks pregnant to get smp. Think there is a minimum pay specified too
They measure your stat maternity pay based on how much you earned in your qualifying weeks. 8 weeks time period. I think between weeks 16-24. I'm possibly wrong with the exact weeks. If you earned enough - over £113 per week you will get stat maternity allowance from your employer. If you earned less you will get a letter from your employer after you hand in your matB1 form which will allow you to claim maternity allowance.
This may work in your favour as with maternity allowance you can hand in the payslips from any 8 weeks. Don't have to be consecutive. So you can provide your highest earning ones. Your payment will be based on this. Max £140 per week.
You will qualify because you will have worked there more than 26 weeks before the qualifying week and will be working there in the qualifying week (the 15th week before week of expected delivery) and it’s calculated on the 8 week period before the qualifying week when you would have been earning £150 a week so you would qualify in that respect too.