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

Form doesn't work properly after a Navigator.push #33

Closed
benoitverstraete opened this issue Mar 19, 2019 · 3 comments
Closed

Form doesn't work properly after a Navigator.push #33

benoitverstraete opened this issue Mar 19, 2019 · 3 comments

Comments

@benoitverstraete
Copy link

Hi,

I try to display the form after a Navigator.of(context).push but I encounter some issues.

With the typeAHead : the suggestions are not displayed while I write something in the textField (if the suggestion is finally displayed, the value is not set).

With the datePicker and timePicker : after choosing a date/time, the value is not correctly set.

Do you experience the same issues ? Or maybe is there something's else to do with the Navigator ?

Here is an example : https://gist.github.com/benoitverstraete/9bb9f23b91d35c4f69effc54ae8ff446

Thanks a lot !

@danvick
Copy link
Collaborator

danvick commented Mar 19, 2019

Hi @benoitverstraete,
Thanks for bringing this to my attention.

  1. There's a minor bug in your code where you are using Navigator.of(context).push. Take note that in Dart you can't combine => with {}, refer here. I changed to the code below and it now functions as expected.
onPressed: () {
        Navigator.of(context)
              .push(MaterialPageRoute(builder: (context) => MyHomePage()));
        },
  1. I've noticed that problems with typeAhead and Date/Time Pickers are caused by a bug in flutter especially the latter versions. You'll notice this line in your console W/IInputConnectionWrapper( 9846): getTextBeforeCursor on inactive InputConnection. I'm working on a workaround to be published ASAP, after which I'll notify you.

Thanks again

@benoitverstraete
Copy link
Author

Thanks for your feedback, @danvick

@danvick
Copy link
Collaborator

danvick commented Mar 20, 2019

DatePicker, TimePicker issues should be fixed according to my tests. Meanwhile, I'm going ahead to close this issue, feel free to reopen or open another one in case you encounter any anomalies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants