该
Navigator.push方法返回Route的通用类型的future:
Navigator.of(context) .push(new MaterialPageRoute<String>(...)) .then((String value) { print(value); });在新路线中,当您拥有所需的价值时:
Navigator.of(context).pop('String');
该
Navigator.push方法返回Route的通用类型的future:
Navigator.of(context) .push(new MaterialPageRoute<String>(...)) .then((String value) { print(value); });在新路线中,当您拥有所需的价值时:
Navigator.of(context).pop('String');