title: How to get variable from statefulwidget class to state class in dart flutter?
body: <p>This is my flutter code</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class Navbar extends StatefulWidget {
    int tabIndex;
    Navbar(this.tabIndex);
  
    _NavbarState createState() =&gt; _NavbarState();
  }
  
  class _NavbarState extends State&lt;Navbar&gt; with SingleTickerProviderStateMixin {
  // I need to get tabIndex here
  }
  </code></pre>
  
  <p>I need to get tabIndex in second class, thank you so much for your answers</p>