'Jetpack Compose Scafold BottomNavigation not overlapping with bottom of screen in Pixel 5 device

Screenshot of BottomNav and Scafold on a pixel 5 device

I have been struggling to get the BottomNav to overlap and cover the white area at the bottom of the screen on a pixel 5 device with any success. The bottom nav is expected to cover all the white area below and this seems to be happening only to Pixel 5 devices.

If you have come across this issue before and has a solution, please help. Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source