Skip to content

Commit

Permalink
fix(firebase_ui_auth): Error added in ProfileScreen in firebase_ui_au…
Browse files Browse the repository at this point in the history
…th 1.4.0 (#10957)

* Fix  Error:

* fix(test): get tests to pass

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.

* fix: revert changes
  • Loading branch information
zachary-russell authored May 17, 2023
1 parent 4897fa0 commit 12284b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/firebase_ui_auth/lib/src/screens/profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,10 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
),
const SizedBox(height: 16),
if (state == EmailVerificationState.pending)
const Row(
// ignore: prefer_const_constructors
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
children: const [
LoadingIndicator(size: 16, borderWidth: 0.5),
SizedBox(width: 16),
Text('Waiting for email verification'),
Expand Down

0 comments on commit 12284b3

Please sign in to comment.