-4

i want to pass some data from one screen to another scrren

  1. first nanme
  2. lastname
  3. email
  4. address
Utsav Balar
  • 3
  • 2
  • 5
  • 1
    Stack Overflow is _not_ a code writing service. We are always glad to help and support new coders but you need to help yourself first by doing some research on the subject and making an attempt to write the code. If you have issues with that code, then feel free to ask a question requesting debugging help. Please read [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). – Karl Jul 18 '19 at 12:56

1 Answers1

0

There's many options to do that, for example a data class, like that,

class Data {
  String firstname;
  String lastname;
  String email;
  String address;

  Data({this.firstname, this.lastname, this.email, this.address});
}

Now you declare and initialize the instance of the class,

  final data = Data(firstname: 'Denzel', lastname: 'Washington', email: 'denzel@hollywood.com', address: 'unknow')

After that you can pass and retrieve to the pages.