File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ custom_lint:
1515 exclude :
1616 - method_name : avoidNumberOfParameters
1717 class_name : Exclude
18- - method_name : avoidNumberOfParameters
18+ - method_name : avoidNumberOfParameters
19+ - method_name : copyWith
20+ class_name : UserDto
1921 - function_lines_of_code :
2022 max_lines : 50
2123 - avoid_non_null_assertion
Original file line number Diff line number Diff line change @@ -18,3 +18,39 @@ class Exclude {
1818 return a + b + c;
1919 }
2020}
21+
22+ class UserDto {
23+ final String email;
24+ final String firstName;
25+ final String id;
26+ final String imageUrl;
27+ final String lastName;
28+
29+ final String phone;
30+ const UserDto ({
31+ required this .id,
32+ required this .firstName,
33+ required this .lastName,
34+ required this .imageUrl,
35+ required this .email,
36+ required this .phone,
37+ });
38+
39+ UserDto copyWith ({
40+ String ? email,
41+ String ? firstName,
42+ String ? id,
43+ String ? imageUrl,
44+ String ? lastName,
45+ String ? phone,
46+ }) {
47+ return UserDto (
48+ email: email ?? this .email,
49+ firstName: firstName ?? this .firstName,
50+ id: id ?? this .id,
51+ imageUrl: imageUrl ?? this .imageUrl,
52+ lastName: lastName ?? this .lastName,
53+ phone: phone ?? this .phone,
54+ );
55+ }
56+ }
You can’t perform that action at this time.
0 commit comments