magento 2 phtml is homege ?

$flagHome = false;
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$request = $objectManager->get('MagentoFrameworkAppActionContext')->getRequest();
if ($request->getFullActionName() == 'cms_index_index') {
   $flagHome = true;
}
Scroll to Top