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

dialog error child == null #8

Closed
GUIKAR741 opened this issue Jan 31, 2020 · 2 comments
Closed

dialog error child == null #8

GUIKAR741 opened this issue Jan 31, 2020 · 2 comments

Comments

@GUIKAR741
Copy link

Hi, i am Brazilian and first i want to thank you for this amazing library.

i found this error "'package:get/src/routes.dart': Failed assertion: line 112 pos 12: 'child == null': is not true." when call

Get.dialog()

I managed to fix it by changing the following line

https://github.com/jonataslaw/get/blob/f64d4a35d51fc7a21cd68f1283f52873f10cee21/lib/src/routes.dart#L112

to

assert(child != null)
@jonataslaw
Copy link
Owner

Hi, i am Brazilian and first i want to thank you for this amazing library.

i found this error "'package:get/src/routes.dart': Failed assertion: line 112 pos 12: 'child == null': is not true." when call

Get.dialog()

I managed to fix it by changing the following line

https://github.com/jonataslaw/get/blob/f64d4a35d51fc7a21cd68f1283f52873f10cee21/lib/src/routes.dart#L112

to

assert(child != null)

First, thanks for this issue, I made this update at 4:30 am, because I was busy and wanted to keep the library active, and the lack of coffee made me insert an "==" instead of "! =" In the assert.
Your solution also works, as there will be no nullity check on the child, however, if someone opens a dialog without a child, there will not be a warning saying that it is mandatory, so I changed the operators and am upgrading to version 1.7.4 now.
I am happy to see someone from the Brazilian community using this lib, and this great framework shows that we are gaining strength, which is incredible. If you face any problem, do not hesitate to inform.

@GUIKAR741
Copy link
Author

Thanks for solving this problem.

jonataslaw pushed a commit that referenced this issue Nov 9, 2020
added GetStatelessWidget with lifecycle control
kamazoun added a commit to kamazoundevz/getx that referenced this issue Jan 17, 2021
kamazoun added a commit to kamazoundevz/getx that referenced this issue Feb 5, 2021
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