title: Passing a value (age) from a widget to another
body: <p>Through textfield inputs, age of user is obtained with the following code (truncated for simplicity):</p>
  <pre><code>onChanged: (valueYear) {
                            if (valueYear.length == 4)
                              FocusScope.of(context).unfocus();
                            valueYearKey = valueYear;
                            valueBirthKey = valueDayKey +
                                '-' +
                                valueMonthKey +
                                '-' +
                                valueYearKey;
                            print(valueBirthKey);
                            DateTime _dateTime = DateTime(
                              int.parse(valueBirthKey.substring(6)),
                              int.parse(valueBirthKey.substring(3, 5)),
                              int.parse(valueBirthKey.substring(0, 2)),
                            );
                            age = DateTime.fromMillisecondsSinceEpoch(
                                        DateTime.now()
                                            .difference(_dateTime)
                                            .inMilliseconds)
                                    .year -
                                1970;
                            print(age);
                            return age = UserAge.age;
                          })),
                ),
              ],
            ),
          ],
        ),
      );
    }
  }
  </code></pre>
  <p>In the terminal, the age was successfully printed. I then formed a class hoping to store the printed value in this class:</p>
  <pre><code>class UserAge with ChangeNotifier {
    static int age;
    notifyListeners();
  }
  </code></pre>
  <p>Below is user pressing a button, if age &gt; 18, dialog pops to confirm and proceed, if age &lt; 18, underage, another dialog pops up.</p>
  <pre><code> onPressed: () async {
                        if (UserAge.age &gt; 18) {
                          await confirmAgeDialog(context);
                        } else {
                          skipAgeDialog(context);
                        }
  </code></pre>
  <p>No red errors was seen on the page, however when I tabbed the button, the error pops up that my UserAge.age is null.</p>
  <p>Which leads me to conclude that the age received from the initial printed value wasn't stored successfully to the class. I've been trying to fix it but to no avail. Im new I apologize if the answer is staring me right in the face. Any guidance is greatly appreciated thanks!</p>