didChangeMetrics method
Automatically hide the overlay when the screen dimension changes or when the user scrolls. This is done to avoid displacement.
Implementation
/// or when the user scrolls. This is done to avoid displacement.
@override
void didChangeMetrics()
{
hideOverlay();
}