Skip to content

Commit

Permalink
Add make fields required in UserInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
vasya-polyansky committed Dec 14, 2020
1 parent 53543b0 commit bdf4338
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/src/user_info/user_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ part 'user_info.g.dart';
abstract class UserInfo with _$UserInfo {
const factory UserInfo({
/// Family name
@JsonKey(name: 'first_name') String firstName,
@JsonKey(name: 'first_name') @required String firstName,

/// Given name
@JsonKey(name: 'given_name') String givenName,
@JsonKey(name: 'given_name') @required String givenName,
}) = _UserInfo;

factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);
Expand Down
12 changes: 9 additions & 3 deletions lib/src/user_info/user_info.freezed.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bdf4338

Please sign in to comment.