Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showDialog method should return data. #2

Closed
maik-kluwe opened this issue Mar 18, 2021 · 3 comments
Closed

showDialog method should return data. #2

maik-kluwe opened this issue Mar 18, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@maik-kluwe
Copy link

When using showDialog i want to return data from the dialog to the "caller"-method that called showDialog.
The showDialog returns Future but should be Future<T?>showDialog(...).

Example "Caller":

showDialog(
      context: context,
      builder: (_) => LoginDialog(),
    ).then((result) => {
      print("Got result:"),
      print(result),
    });

Here i need the result to not be void.

Example LoginDialog:

onPressed: () => {
  Navigator.pop(context, {userController.text, passwordController.text})
},

I am passing the text values of two TextBoxes to the "caller".

@maik-kluwe
Copy link
Author

I wanted to create a pull request, but there are no other branches or i am not used to github at the time 😅

@bdlukaa bdlukaa self-assigned this Mar 18, 2021
@bdlukaa bdlukaa added good first issue Good for newcomers enhancement New feature or request labels Mar 18, 2021
@bdlukaa
Copy link
Owner

bdlukaa commented Mar 18, 2021

Hey, thanks for reporting this issue. This will be fixed in the next version.

@bdlukaa
Copy link
Owner

bdlukaa commented Mar 19, 2021

Fixed in v1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants