kivy.factory.FactoryException: Unknown class MDTopAppBar

I am a beginner learning Kivy and I am facing lots of issues and resolving it myself. But currently I am stuck in this one issue where I am trying to use MDTopAppBar but getting an error which is-

 kivy.factory.FactoryException: Unknown class 
  

My Code:

<Screen2>:
    name: 'Screen1'
    MDBoxLayout:
        orientation: 'vertical'

        MDTopAppBar:
            title: 'Demo App'
            pos_hist: {'center_x': 0.5, 'center_y': 1}

Kivymd version = 0.104.2