-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(firebase_ui_auth): Error added in ProfileScreen in firebase_ui_auth 1.4.0 #10957
Conversation
@zachary-russell analyzer fails with your change
|
I think this issue is what caused the bug in the first place. I'll take a look and see if I can resolve it. |
The prefer_const_constructors warning is ignored in this case because the LoadingIndicator widget used inside the children list of the Row does not have a const constructor. This is due to the fact that LoadingIndicator extends PlatformWidget, which doesn't have a const constructor, making it impossible to have a const constructor for LoadingIndicator. Since we can't make the LoadingIndicator constructor const, we have to ignore the warning for the specific Row constructor. This is an acceptable solution in cases like this, where making the constructor const is not feasible or possible.
The prefer_const_constructors warning is ignored in this case because the LoadingIndicator widget used inside the children list of the Row does not have a const constructor. This is due to the fact that LoadingIndicator extends PlatformWidget, which doesn't have a const constructor, making it impossible to have a const constructor for LoadingIndicator. Since we can't make the LoadingIndicator constructor const, we have to ignore the warning for the specific Row constructor. This is an acceptable solution in cases like this, where making the constructor const is not feasible or possible. I'm still getting errors in the code:
I don't know exactly how to resolve this and I seem to be going in circles. I'd appreciate a nudge in the right direction here :) Are you aware of another way to solve it I'm definitely willing to give it a stab. |
hey @zachary-russell, thanks for the PR. Do you mind changing it so the |
Sure @russellwheatley, that's what was rejected on the initial commit I made 😸 I can confirm it works (both commits either make the More than happy to help fix the linting rules as well if you cant point me in the right direction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that ought to do it, thanks! 👍
Is there a timetable/schedule for when this will be released to pub.dev ? |
Description
firebase_ui_auth throws an error when building for version 1.4.0.:
../../.pub-cache/hosted/pub.dev/firebase_ui_auth-1.4.0/lib/src/screens/profile_screen.dart:393:19: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. const Row( ^^^
Related Issues
Issue
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?