简体   繁体   中英

How to send text fields data from list to another screen in flutter

if I have so many text field from list and all of them in list View builder now how to send selected fields data to another screen in flutter

First Screen,pass data in Navigator:

Navigator.push(
            context,
            MaterialPageRoute(builder: (context) =>secondscreen('value')),
          );

in Second Screen:

class secondscreen extends StatefulWidget {
  secondscreen(this.uid);  
  final uid;
  @override
  secondscreenstate createState() => secondscreenstate (this.uid);
}

class secondscreenstate extends State<secondscreen> {
 
  var uid; //where uid will carry the value from first screen
  secondscreenstate (this.uid);
.......

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM