Created
November 5, 2020 19:24
-
-
Save douglasiacovelli/0ff25e5f34a45f7fced4ef82e0edd0e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Credentials { | |
final String givenName; | |
final String familyName; | |
Credentials(this.givenName, this.familyName); | |
} | |
void main() { | |
final credentials1 = Credentials('Doug', 'blabla'); | |
final credentials2 = Credentials(null, null); | |
final firstName1 = credentials1.givenName ?? ''; | |
final firstName2 = credentials2.givenName ?? ''; | |
print('FirstName for credentials1 is: $firstName1'); | |
print('FirstName for credentials2 is: $firstName2'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment