Skip to content
This repository was archived by the owner on May 13, 2023. It is now read-only.

Conversation

TimWhiting
Copy link
Contributor

@TimWhiting TimWhiting commented Mar 4, 2021

What kind of change does this PR introduce?

Migrates to null safety

What is the current behavior?

Using null unsafe dart

What is the new behavior?

Using null safe dart

Additional context

Addresses #10
@phamhieu

@TimWhiting
Copy link
Contributor Author

@phamhieu
Ready for review

@TimWhiting
Copy link
Contributor Author

@phamhieu
I made the changes requested and made a few more fields final to match the behavior and intentions.

@TimWhiting
Copy link
Contributor Author

@phamhieu
Any other changes, or can this be merged?

required String email,
required String createdAt,
required String confirmedAt,
required String lastSignInAt,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmedAt and lastSignInAt are nullable. So we don't need to required them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, i'm not sure about the use-case for AuthUser #6
for now, just follow exactly like User constructor on gotrue-dart.

User(
      {required this.id,
      required Map<String, dynamic>? appMetadata,
      required Map<String, dynamic>? userMetadata,
      required this.aud,
      required this.email,
      required this.createdAt,
      this.confirmedAt,
      this.lastSignInAt,
      required this.role,
      required this.updatedAt})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think? @TimWhiting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think the gotrue class should just be exported directly, rather than wrapping it. I'm not sure this class will be useful, and if it is, it can be added in later.

@phamhieu
Copy link
Member

just 1 change left. otherwise lgtm 👍

@phamhieu phamhieu merged commit f58cff9 into supabase:main Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants