title: Flat List - ScrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed
body: <pre><code>setTimeout(() =&gt; { this.myFlatList.scrollToIndex({animated:true , index: 100}) }, 100);  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BfLE8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BfLE8.png" alt="enter image description here"></a></p>
  
  <p>If i use scrolltoindex in flat list return to me this error;</p>
  
  <blockquote>
    <p>scrollToIndex should be used in conjunction with getItemLayout or
    onScrollToIndexFailed</p>
  </blockquote>
  
  <p>I tried to use  getItemLayout but my flatlist items have different height, how can i fix this?</p>
  
  <pre><code>getItemLayout={(data, index) =&gt; (
                  {length: 40, offset: 40 * index, index}
                )}
  </code></pre>