title: Flutter : how to set itemCount length in IndexedListView builder
body: <p>i am trying to scrolling to an specific index by its index number in at ListView. i used to IndexedListView builder from <a href="https://pub.dev/packages/indexed_list_view/example" rel="nofollow noreferrer">https://pub.dev/packages/indexed_list_view/example</a>. but i got error in &quot;itemCount: myData.length&quot;, so have been unable to use a fix arrange in ListView.</p>
  <pre><code>class MyHomePage extends StatelessWidget {
  
  static IndexedScrollController controller =
    IndexedScrollController(initialIndex: 0);
  
  @override
    Widget build(BuildContext context) {
  
  return Scaffold(
    body: Column(
      children: [
        Expanded(
          child: IndexedListView.builder(
            controller: controller,
            itemBuilder: (BuildContext context, int index) {
              return Card(
                child: Container(
                  height: 500,
                  child: Center(child: Text('ITEM $index')),),);},),),
        Container(height: 3.0, color: Colors.black),
        Container(
          color: Colors.grey[800],
          child: Column(
            children: &lt;Widget&gt;[
              GestureDetector(onTap: () {controller.jumpToIndex(5);},
                child: Container(
                  color: Colors.green,
                  width: MediaQuery.of(context).size.width,
                  height: 100,
                  child: Center(child: Text(&quot;Button to go to An specific index&quot;, style: TextStyle(color: Colors.white)),),),)],),),],),);}
     }
  </code></pre>