title: Passing down arguments from App to Children Classes
body: <p>I've initialized my primary Kivy app class with an argument. Let's call it <code>x</code>. I need to pass this <code>x</code> value down to other classes in the app. How do I go about doing that?</p>
  <p>For example, I have setup another <code>GridLayout</code> class to take the value <code>x</code> in it's <code>__init__</code> too. I tried to call this <code>GridLayout</code> in the main <code>App</code> but it returns this following error.</p>
  <p><code>TypeError: __init__() missing 1 required positional argument: 'x'</code></p>
  <p>I've supplied the value for sure.</p>
  <p>Here's the total code.</p>
  <pre class="lang-py prettyprint-override"><code>from kivy.app import App
  from kivy.uix.gridlayout import GridLayout
  from kivy.properties import StringProperty
  
  class MainWidget(GridLayout):
      x= StringProperty('')
  
      def __init__(self, x, **kwargs):
          super(MainWidget, self).__init__(**kwargs)
          self.x= x
  
  class App(App):
      def __init__(self, x) -&gt; None:
          App.__init__(self)
          self.x= x
          self.run()
  
      def build(self):
          App.title = 'Title'
          return MainWidget(self.x)
  
  
  if __name__ == '__main__':
      app = App(x='Value of X')
  </code></pre>
  <p>Not able to figure how to pass down arguments. If this is not feasible, can someone tell me what would be the right way to approach this problem?</p>