Does the flashlight trick work/safe?

Angel • engaged💍👫 baby in heaven 👼 beautiful baby girl 5/8/2019 🤱👨‍👩‍👧 due July 2020🤰

I googled ways to get baby to move and one of them said to hold a flashlight to my belly and baby might start moving. I'm just wondering if it works or if it's safe.