title: How do I access a method of the state objects for a list of stateful widgets? (Flutter)
body: <pre><code>class Astate extends State&lt;A&gt;
  {
     List b=new List&lt;B&gt;();
     @override
     Widget build(BuildContext context){
  
         b.add(B());  
        //how do I access theMethod() for the state object for b[0]?
  
      }
  }
  
  class B extends StatefulWidget
  {
        @override
        Bstate createState() =&gt; Bstate();
  }
  
  class Bstate extends State&lt;B&gt;
  {
      theMethod()
       { 
          //some content
       }
  
    @override
    Widget build(BuildContext context) {
     }
  
  }
  </code></pre>
  
  <p>Is there a way to access the theMethod() using b[0] from it's corresponding state object?
  If not, is there another way to achieve the same?</p>