title: Pass parameters from child to parent and viceversa
body: <p>I want to create a StatefulWidget, so that child can use parameters of parent as well as they can change it also. </p>
  
  <p>//need solution for problem like below.</p>
  
  <pre><code>import "flutter/material.dart";    
  Toggle(
    builder: (value) =&gt; IconButton(
      icon: Icon(value ? Icons.add : Icons.minimize),
        onPressed: () =&gt; value = !value,
    ),
  );
  
  class Toggle extends StatefulWidget{
    final bool status;
    Widget Function(bool status) builder;
    Toggle({Key key, this.status = true, this.builder,}) : super(key: key);
    @override _ToggleState createState() =&gt; _ToggleState();
  }
  
  class _ToggleState extends State&lt;Toggle&gt; {
    @override Widget build(BuildContext context) =&gt; widget.builder(widget.status);
  }
  </code></pre>