title: how to pass from object state to object and then pass it to another screen
body: <p>I need your help,
  At first I have two pages, both of them are stateful widget, one of them is the main screen, 2nd page has data and i want to pass it to the main screen</p>
  <p><strong>mainpage</strong></p>
  <p><code>code</code></p>
  <pre><code>  @override
    _PriceScreenState createState() =&gt; _PriceScreenState();
  }
  
  class _PriceScreenState extends State&lt;PriceScreen&gt; {
  
    String selectedCurrency = 'USD';
  
    String bitcoinValueInUSD;
  
    int dropNumber;
  
    void getCurrenciesBitcoin() async {
  
      try {
        CoinData coinData = CoinData();
  
        double usdPrice = await coinData.getCurrencies();
  
        setState(() {
          bitcoinValueInUSD = usdPrice.toStringAsFixed(0);
        });
      } catch (e) {
        print(e);
      }
    }
  
    @override
    Widget build(BuildContext context) {
      getCurrenciesBitcoin();
  
      return Scaffold(
        appBar: AppBar(
          title: Text(' Coin Ticker'),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: &lt;Widget&gt;[
            Padding(
              padding: EdgeInsets.fromLTRB(18.0, 18.0, 18.0, 0),
              child: Card(
                color: Colors.lightBlueAccent,
                elevation: 5.0,
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(10.0),
                ),
                child: Padding(
                  padding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 28.0),
                  child: Text(
                    '1 BTC = $bitcoinValueInUSD $selectedCurrency',
                    textAlign: TextAlign.center,
                    style: TextStyle(
                      fontSize: 20.0,
                      color: Colors.white,
                    ),
                  ),
                ),
              ),
            ),
            Container(
              height: 150.0,
              alignment: Alignment.center,
              padding: EdgeInsets.only(bottom: 30.0),
              color: Colors.lightBlue,
              child: GetDropDownMenu(
                selectedCurrency: ,
              ),
            ),
          ],
        ),
      );
    }
  }
  </code></pre>
  <p><strong>and this is the second page</strong></p>
  <pre><code>class GetDropDownMenu extends StatefulWidget {
    
    @override
    _GetDropDownMenuState createState() =&gt; _GetDropDownMenuState();
  }
  
  class _GetDropDownMenuState extends State&lt;GetDropDownMenu&gt; {
    String selectedCurrency;
  
    List&lt;DropdownMenuItem&lt;String&gt;&gt; getDropDownItem() {
      List&lt;DropdownMenuItem&lt;String&gt;&gt; dropDownItems = [];
  
      for (String currency in currenciesList) {
        var newItem = DropdownMenuItem(
          child: Text(currency),
          value: currency,
        );
        dropDownItems.add(newItem);
      }
      return dropDownItems;
    }
  
    @override
    Widget build(BuildContext context) {
      return DropdownButton&lt;String&gt;(
          value: selectedCurrency,
          items: getDropDownItem(),
          onChanged: (value) {
            setState(() {
              selectedCurrency = value;
            });
          });
    }
  }
  </code></pre>
  <p>, what i need is to pass the selectedCurrency value from 2nd page to the main page to be equal selectedCurrency  variable there</p>