To pass data to the stateful widget just pass parameters to the state using the constructor . You can easily access this parameter using the widget. yourPeram in your second stateful widget.
Read moreWhy do we pass functions to Flutter widgets?
Functions are first-class objects in Dart and can be passed as parameters to other functions. We pass a function to a widget essentially saying, invoke this function when something happens . … Dart does both declarations as well as setting up the callback.20 Tem 2020
Read more