Skip to content

Commit

Permalink
flashにvisibilityを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Aug 17, 2024
1 parent dc06f7e commit f40c2b7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/src/data/base/flash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Flash with _$Flash {
required String title,
required String summary,
required String script,
FlashVisibility? visibility,
required String userId,
required UserLite user,
int? likedCount,
Expand Down
25 changes: 23 additions & 2 deletions lib/src/data/base/flash.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ mixin _$Flash {
String get title => throw _privateConstructorUsedError;
String get summary => throw _privateConstructorUsedError;
String get script => throw _privateConstructorUsedError;
FlashVisibility? get visibility => throw _privateConstructorUsedError;
String get userId => throw _privateConstructorUsedError;
UserLite get user => throw _privateConstructorUsedError;
int? get likedCount => throw _privateConstructorUsedError;
Expand All @@ -50,6 +51,7 @@ abstract class $FlashCopyWith<$Res> {
String title,
String summary,
String script,
FlashVisibility? visibility,
String userId,
UserLite user,
int? likedCount,
Expand Down Expand Up @@ -77,6 +79,7 @@ class _$FlashCopyWithImpl<$Res, $Val extends Flash>
Object? title = null,
Object? summary = null,
Object? script = null,
Object? visibility = freezed,
Object? userId = null,
Object? user = null,
Object? likedCount = freezed,
Expand Down Expand Up @@ -107,6 +110,10 @@ class _$FlashCopyWithImpl<$Res, $Val extends Flash>
? _value.script
: script // ignore: cast_nullable_to_non_nullable
as String,
visibility: freezed == visibility
? _value.visibility
: visibility // ignore: cast_nullable_to_non_nullable
as FlashVisibility?,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -149,6 +156,7 @@ abstract class _$$FlashImplCopyWith<$Res> implements $FlashCopyWith<$Res> {
String title,
String summary,
String script,
FlashVisibility? visibility,
String userId,
UserLite user,
int? likedCount,
Expand All @@ -175,6 +183,7 @@ class __$$FlashImplCopyWithImpl<$Res>
Object? title = null,
Object? summary = null,
Object? script = null,
Object? visibility = freezed,
Object? userId = null,
Object? user = null,
Object? likedCount = freezed,
Expand Down Expand Up @@ -205,6 +214,10 @@ class __$$FlashImplCopyWithImpl<$Res>
? _value.script
: script // ignore: cast_nullable_to_non_nullable
as String,
visibility: freezed == visibility
? _value.visibility
: visibility // ignore: cast_nullable_to_non_nullable
as FlashVisibility?,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -235,6 +248,7 @@ class _$FlashImpl implements _Flash {
required this.title,
required this.summary,
required this.script,
this.visibility,
required this.userId,
required this.user,
this.likedCount,
Expand All @@ -258,6 +272,8 @@ class _$FlashImpl implements _Flash {
@override
final String script;
@override
final FlashVisibility? visibility;
@override
final String userId;
@override
final UserLite user;
Expand All @@ -269,7 +285,7 @@ class _$FlashImpl implements _Flash {

@override
String toString() {
return 'Flash(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, summary: $summary, script: $script, userId: $userId, user: $user, likedCount: $likedCount, isLiked: $isLiked)';
return 'Flash(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, summary: $summary, script: $script, visibility: $visibility, userId: $userId, user: $user, likedCount: $likedCount, isLiked: $isLiked)';
}

@override
Expand All @@ -285,6 +301,8 @@ class _$FlashImpl implements _Flash {
(identical(other.title, title) || other.title == title) &&
(identical(other.summary, summary) || other.summary == summary) &&
(identical(other.script, script) || other.script == script) &&
(identical(other.visibility, visibility) ||
other.visibility == visibility) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.user, user) || other.user == user) &&
(identical(other.likedCount, likedCount) ||
Expand All @@ -295,7 +313,7 @@ class _$FlashImpl implements _Flash {
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, title,
summary, script, userId, user, likedCount, isLiked);
summary, script, visibility, userId, user, likedCount, isLiked);

@JsonKey(ignore: true)
@override
Expand All @@ -319,6 +337,7 @@ abstract class _Flash implements Flash {
required final String title,
required final String summary,
required final String script,
final FlashVisibility? visibility,
required final String userId,
required final UserLite user,
final int? likedCount,
Expand All @@ -341,6 +360,8 @@ abstract class _Flash implements Flash {
@override
String get script;
@override
FlashVisibility? get visibility;
@override
String get userId;
@override
UserLite get user;
Expand Down
8 changes: 8 additions & 0 deletions lib/src/data/base/flash.g.dart

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

0 comments on commit f40c2b7

Please sign in to comment.