title: how to rerun init state of widget from out side of class in flutter?
body: <p>I want to rerun init State of Widget when user click on button(which is in other widget) of App.</p>
  <p>I tried following code but not worked:</p>
  <pre><code>onPressed:(){
  ExampleWidget();
  }
  </code></pre>
  <p><strong>Explanation:</strong>
  I want to rerun Widget when user click on a button. That button is defined in other widget of the app The Example Code is Below:</p>
  <pre><code>class ExampleWidget extends StatefulWidget {
  const ExampleWidget({Key? key}) : super(key: key);
  
  @override
  State&lt;ExampleWidget&gt; createState() =&gt; ExampleWidgetState();
   }
  
  class ExampleWidgetState extends State&lt;ExampleWidget&gt; {
  
  Code between this Brackets
  
  }
  </code></pre>
  <p>I want to rerun this Widget. I am Try Following Method:</p>
  <pre><code>class OtherWidget extends StatelessWidget {
  
  
  @override
  Widget build(BuildContext context) {
  return Scaffold(
  floatingActionButton: FloatingActionButton(
   onPressed:() {  ExampleWidget()  }
  ,child:Icon(Icons.delete)
   ,),),}
  </code></pre>
  <p>If you know the answer of this question the answer  this question..</p>