From 21daa77afbafd99a38ece3700336b0a3821492f9 Mon Sep 17 00:00:00 2001
From: poppingmoon <63451158+poppingmoon@users.noreply.github.com>
Date: Sun, 15 Oct 2023 17:42:20 +0900
Subject: [PATCH] =?UTF-8?q?ffVisibility=E3=81=AE=E5=9E=8B=E3=82=92FFVisibi?=
 =?UTF-8?q?lity=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/src/data/base/user.dart         |  8 ++---
 lib/src/data/base/user.freezed.dart | 48 ++++++++++++++---------------
 lib/src/data/base/user.g.dart       | 18 +++++++----
 3 files changed, 40 insertions(+), 34 deletions(-)

diff --git a/lib/src/data/base/user.dart b/lib/src/data/base/user.dart
index c01bf324..b7eb8f32 100644
--- a/lib/src/data/base/user.dart
+++ b/lib/src/data/base/user.dart
@@ -60,7 +60,7 @@ abstract class UserDetailed implements User {
   String? get pinnedPageId;
   Map<String, dynamic>? get pinnedPage;
   bool get publicReactions;
-  String get ffVisibility;
+  FFVisibility get ffVisibility;
   bool get twoFactorEnabled;
   bool get usePasswordLessLogin;
   bool get securityKeys;
@@ -144,7 +144,7 @@ class UserDetailedNotMe with _$UserDetailedNotMe implements UserDetailed {
     String? pinnedPageId,
     Map<String, dynamic>? pinnedPage,
     required bool publicReactions,
-    required String ffVisibility,
+    required FFVisibility ffVisibility,
     required bool twoFactorEnabled,
     required bool usePasswordLessLogin,
     required bool securityKeys,
@@ -197,7 +197,7 @@ class UserDetailedNotMeWithRelations
     String? pinnedPageId,
     Map<String, dynamic>? pinnedPage,
     required bool publicReactions,
-    required String ffVisibility,
+    required FFVisibility ffVisibility,
     required bool twoFactorEnabled,
     required bool usePasswordLessLogin,
     required bool securityKeys,
@@ -256,7 +256,7 @@ class MeDetailed with _$MeDetailed implements UserDetailed {
     String? pinnedPageId,
     Map<String, dynamic>? pinnedPage,
     required bool publicReactions,
-    required String ffVisibility,
+    required FFVisibility ffVisibility,
     required bool twoFactorEnabled,
     required bool usePasswordLessLogin,
     required bool securityKeys,
diff --git a/lib/src/data/base/user.freezed.dart b/lib/src/data/base/user.freezed.dart
index 3ccd2f5b..5f68a965 100644
--- a/lib/src/data/base/user.freezed.dart
+++ b/lib/src/data/base/user.freezed.dart
@@ -518,7 +518,7 @@ mixin _$UserDetailedNotMe {
   String? get pinnedPageId => throw _privateConstructorUsedError;
   Map<String, dynamic>? get pinnedPage => throw _privateConstructorUsedError;
   bool get publicReactions => throw _privateConstructorUsedError;
-  String get ffVisibility => throw _privateConstructorUsedError;
+  FFVisibility get ffVisibility => throw _privateConstructorUsedError;
   bool get twoFactorEnabled => throw _privateConstructorUsedError;
   bool get usePasswordLessLogin => throw _privateConstructorUsedError;
   bool get securityKeys => throw _privateConstructorUsedError;
@@ -574,7 +574,7 @@ abstract class $UserDetailedNotMeCopyWith<$Res> {
       String? pinnedPageId,
       Map<String, dynamic>? pinnedPage,
       bool publicReactions,
-      String ffVisibility,
+      FFVisibility ffVisibility,
       bool twoFactorEnabled,
       bool usePasswordLessLogin,
       bool securityKeys,
@@ -788,7 +788,7 @@ class _$UserDetailedNotMeCopyWithImpl<$Res, $Val extends UserDetailedNotMe>
       ffVisibility: null == ffVisibility
           ? _value.ffVisibility
           : ffVisibility // ignore: cast_nullable_to_non_nullable
-              as String,
+              as FFVisibility,
       twoFactorEnabled: null == twoFactorEnabled
           ? _value.twoFactorEnabled
           : twoFactorEnabled // ignore: cast_nullable_to_non_nullable
@@ -870,7 +870,7 @@ abstract class _$$_UserDetailedNotMeCopyWith<$Res>
       String? pinnedPageId,
       Map<String, dynamic>? pinnedPage,
       bool publicReactions,
-      String ffVisibility,
+      FFVisibility ffVisibility,
       bool twoFactorEnabled,
       bool usePasswordLessLogin,
       bool securityKeys,
@@ -1083,7 +1083,7 @@ class __$$_UserDetailedNotMeCopyWithImpl<$Res>
       ffVisibility: null == ffVisibility
           ? _value.ffVisibility
           : ffVisibility // ignore: cast_nullable_to_non_nullable
-              as String,
+              as FFVisibility,
       twoFactorEnabled: null == twoFactorEnabled
           ? _value.twoFactorEnabled
           : twoFactorEnabled // ignore: cast_nullable_to_non_nullable
@@ -1303,7 +1303,7 @@ class _$_UserDetailedNotMe implements _UserDetailedNotMe {
   @override
   final bool publicReactions;
   @override
-  final String ffVisibility;
+  final FFVisibility ffVisibility;
   @override
   final bool twoFactorEnabled;
   @override
@@ -1508,7 +1508,7 @@ abstract class _UserDetailedNotMe implements UserDetailedNotMe {
       final String? pinnedPageId,
       final Map<String, dynamic>? pinnedPage,
       required final bool publicReactions,
-      required final String ffVisibility,
+      required final FFVisibility ffVisibility,
       required final bool twoFactorEnabled,
       required final bool usePasswordLessLogin,
       required final bool securityKeys,
@@ -1601,7 +1601,7 @@ abstract class _UserDetailedNotMe implements UserDetailedNotMe {
   @override
   bool get publicReactions;
   @override
-  String get ffVisibility;
+  FFVisibility get ffVisibility;
   @override
   bool get twoFactorEnabled;
   @override
@@ -1672,7 +1672,7 @@ mixin _$UserDetailedNotMeWithRelations {
   String? get pinnedPageId => throw _privateConstructorUsedError;
   Map<String, dynamic>? get pinnedPage => throw _privateConstructorUsedError;
   bool get publicReactions => throw _privateConstructorUsedError;
-  String get ffVisibility => throw _privateConstructorUsedError;
+  FFVisibility get ffVisibility => throw _privateConstructorUsedError;
   bool get twoFactorEnabled => throw _privateConstructorUsedError;
   bool get usePasswordLessLogin => throw _privateConstructorUsedError;
   bool get securityKeys => throw _privateConstructorUsedError;
@@ -1738,7 +1738,7 @@ abstract class $UserDetailedNotMeWithRelationsCopyWith<$Res> {
       String? pinnedPageId,
       Map<String, dynamic>? pinnedPage,
       bool publicReactions,
-      String ffVisibility,
+      FFVisibility ffVisibility,
       bool twoFactorEnabled,
       bool usePasswordLessLogin,
       bool securityKeys,
@@ -1969,7 +1969,7 @@ class _$UserDetailedNotMeWithRelationsCopyWithImpl<$Res,
       ffVisibility: null == ffVisibility
           ? _value.ffVisibility
           : ffVisibility // ignore: cast_nullable_to_non_nullable
-              as String,
+              as FFVisibility,
       twoFactorEnabled: null == twoFactorEnabled
           ? _value.twoFactorEnabled
           : twoFactorEnabled // ignore: cast_nullable_to_non_nullable
@@ -2084,7 +2084,7 @@ abstract class _$$_UserDetailedNotMeWithRelationsCopyWith<$Res>
       String? pinnedPageId,
       Map<String, dynamic>? pinnedPage,
       bool publicReactions,
-      String ffVisibility,
+      FFVisibility ffVisibility,
       bool twoFactorEnabled,
       bool usePasswordLessLogin,
       bool securityKeys,
@@ -2315,7 +2315,7 @@ class __$$_UserDetailedNotMeWithRelationsCopyWithImpl<$Res>
       ffVisibility: null == ffVisibility
           ? _value.ffVisibility
           : ffVisibility // ignore: cast_nullable_to_non_nullable
-              as String,
+              as FFVisibility,
       twoFactorEnabled: null == twoFactorEnabled
           ? _value.twoFactorEnabled
           : twoFactorEnabled // ignore: cast_nullable_to_non_nullable
@@ -2577,7 +2577,7 @@ class _$_UserDetailedNotMeWithRelations
   @override
   final bool publicReactions;
   @override
-  final String ffVisibility;
+  final FFVisibility ffVisibility;
   @override
   final bool twoFactorEnabled;
   @override
@@ -2825,7 +2825,7 @@ abstract class _UserDetailedNotMeWithRelations
       final String? pinnedPageId,
       final Map<String, dynamic>? pinnedPage,
       required final bool publicReactions,
-      required final String ffVisibility,
+      required final FFVisibility ffVisibility,
       required final bool twoFactorEnabled,
       required final bool usePasswordLessLogin,
       required final bool securityKeys,
@@ -2926,7 +2926,7 @@ abstract class _UserDetailedNotMeWithRelations
   @override
   bool get publicReactions;
   @override
-  String get ffVisibility;
+  FFVisibility get ffVisibility;
   @override
   bool get twoFactorEnabled;
   @override
@@ -3012,7 +3012,7 @@ mixin _$MeDetailed {
   String? get pinnedPageId => throw _privateConstructorUsedError;
   Map<String, dynamic>? get pinnedPage => throw _privateConstructorUsedError;
   bool get publicReactions => throw _privateConstructorUsedError;
-  String get ffVisibility => throw _privateConstructorUsedError;
+  FFVisibility get ffVisibility => throw _privateConstructorUsedError;
   bool get twoFactorEnabled => throw _privateConstructorUsedError;
   bool get usePasswordLessLogin => throw _privateConstructorUsedError;
   bool get securityKeys => throw _privateConstructorUsedError;
@@ -3103,7 +3103,7 @@ abstract class $MeDetailedCopyWith<$Res> {
       String? pinnedPageId,
       Map<String, dynamic>? pinnedPage,
       bool publicReactions,
-      String ffVisibility,
+      FFVisibility ffVisibility,
       bool twoFactorEnabled,
       bool usePasswordLessLogin,
       bool securityKeys,
@@ -3379,7 +3379,7 @@ class _$MeDetailedCopyWithImpl<$Res, $Val extends MeDetailed>
       ffVisibility: null == ffVisibility
           ? _value.ffVisibility
           : ffVisibility // ignore: cast_nullable_to_non_nullable
-              as String,
+              as FFVisibility,
       twoFactorEnabled: null == twoFactorEnabled
           ? _value.twoFactorEnabled
           : twoFactorEnabled // ignore: cast_nullable_to_non_nullable
@@ -3589,7 +3589,7 @@ abstract class _$$_MeDetailedCopyWith<$Res>
       String? pinnedPageId,
       Map<String, dynamic>? pinnedPage,
       bool publicReactions,
-      String ffVisibility,
+      FFVisibility ffVisibility,
       bool twoFactorEnabled,
       bool usePasswordLessLogin,
       bool securityKeys,
@@ -3865,7 +3865,7 @@ class __$$_MeDetailedCopyWithImpl<$Res>
       ffVisibility: null == ffVisibility
           ? _value.ffVisibility
           : ffVisibility // ignore: cast_nullable_to_non_nullable
-              as String,
+              as FFVisibility,
       twoFactorEnabled: null == twoFactorEnabled
           ? _value.twoFactorEnabled
           : twoFactorEnabled // ignore: cast_nullable_to_non_nullable
@@ -4242,7 +4242,7 @@ class _$_MeDetailed implements _MeDetailed {
   @override
   final bool publicReactions;
   @override
-  final String ffVisibility;
+  final FFVisibility ffVisibility;
   @override
   final bool twoFactorEnabled;
   @override
@@ -4622,7 +4622,7 @@ abstract class _MeDetailed implements MeDetailed {
       final String? pinnedPageId,
       final Map<String, dynamic>? pinnedPage,
       required final bool publicReactions,
-      required final String ffVisibility,
+      required final FFVisibility ffVisibility,
       required final bool twoFactorEnabled,
       required final bool usePasswordLessLogin,
       required final bool securityKeys,
@@ -4746,7 +4746,7 @@ abstract class _MeDetailed implements MeDetailed {
   @override
   bool get publicReactions;
   @override
-  String get ffVisibility;
+  FFVisibility get ffVisibility;
   @override
   bool get twoFactorEnabled;
   @override
diff --git a/lib/src/data/base/user.g.dart b/lib/src/data/base/user.g.dart
index e28934f4..c0f43c6e 100644
--- a/lib/src/data/base/user.g.dart
+++ b/lib/src/data/base/user.g.dart
@@ -115,7 +115,7 @@ _$_UserDetailedNotMe _$$_UserDetailedNotMeFromJson(Map<String, dynamic> json) =>
       pinnedPageId: json['pinnedPageId'] as String?,
       pinnedPage: json['pinnedPage'] as Map<String, dynamic>?,
       publicReactions: json['publicReactions'] as bool,
-      ffVisibility: json['ffVisibility'] as String,
+      ffVisibility: $enumDecode(_$FFVisibilityEnumMap, json['ffVisibility']),
       twoFactorEnabled: json['twoFactorEnabled'] as bool,
       usePasswordLessLogin: json['usePasswordLessLogin'] as bool,
       securityKeys: json['securityKeys'] as bool,
@@ -166,7 +166,7 @@ Map<String, dynamic> _$$_UserDetailedNotMeToJson(
       'pinnedPageId': instance.pinnedPageId,
       'pinnedPage': instance.pinnedPage,
       'publicReactions': instance.publicReactions,
-      'ffVisibility': instance.ffVisibility,
+      'ffVisibility': _$FFVisibilityEnumMap[instance.ffVisibility]!,
       'twoFactorEnabled': instance.twoFactorEnabled,
       'usePasswordLessLogin': instance.usePasswordLessLogin,
       'securityKeys': instance.securityKeys,
@@ -180,6 +180,12 @@ Value? _$JsonConverterFromJson<Json, Value>(
 ) =>
     json == null ? null : fromJson(json as Json);
 
+const _$FFVisibilityEnumMap = {
+  FFVisibility.public: 'public',
+  FFVisibility.followers: 'followers',
+  FFVisibility.private: 'private',
+};
+
 _$_UserDetailedNotMeWithRelations _$$_UserDetailedNotMeWithRelationsFromJson(
         Map<String, dynamic> json) =>
     _$_UserDetailedNotMeWithRelations(
@@ -244,7 +250,7 @@ _$_UserDetailedNotMeWithRelations _$$_UserDetailedNotMeWithRelationsFromJson(
       pinnedPageId: json['pinnedPageId'] as String?,
       pinnedPage: json['pinnedPage'] as Map<String, dynamic>?,
       publicReactions: json['publicReactions'] as bool,
-      ffVisibility: json['ffVisibility'] as String,
+      ffVisibility: $enumDecode(_$FFVisibilityEnumMap, json['ffVisibility']),
       twoFactorEnabled: json['twoFactorEnabled'] as bool,
       usePasswordLessLogin: json['usePasswordLessLogin'] as bool,
       securityKeys: json['securityKeys'] as bool,
@@ -305,7 +311,7 @@ Map<String, dynamic> _$$_UserDetailedNotMeWithRelationsToJson(
       'pinnedPageId': instance.pinnedPageId,
       'pinnedPage': instance.pinnedPage,
       'publicReactions': instance.publicReactions,
-      'ffVisibility': instance.ffVisibility,
+      'ffVisibility': _$FFVisibilityEnumMap[instance.ffVisibility]!,
       'twoFactorEnabled': instance.twoFactorEnabled,
       'usePasswordLessLogin': instance.usePasswordLessLogin,
       'securityKeys': instance.securityKeys,
@@ -384,7 +390,7 @@ _$_MeDetailed _$$_MeDetailedFromJson(Map<String, dynamic> json) =>
       pinnedPageId: json['pinnedPageId'] as String?,
       pinnedPage: json['pinnedPage'] as Map<String, dynamic>?,
       publicReactions: json['publicReactions'] as bool,
-      ffVisibility: json['ffVisibility'] as String,
+      ffVisibility: $enumDecode(_$FFVisibilityEnumMap, json['ffVisibility']),
       twoFactorEnabled: json['twoFactorEnabled'] as bool,
       usePasswordLessLogin: json['usePasswordLessLogin'] as bool,
       securityKeys: json['securityKeys'] as bool,
@@ -480,7 +486,7 @@ Map<String, dynamic> _$$_MeDetailedToJson(_$_MeDetailed instance) =>
       'pinnedPageId': instance.pinnedPageId,
       'pinnedPage': instance.pinnedPage,
       'publicReactions': instance.publicReactions,
-      'ffVisibility': instance.ffVisibility,
+      'ffVisibility': _$FFVisibilityEnumMap[instance.ffVisibility]!,
       'twoFactorEnabled': instance.twoFactorEnabled,
       'usePasswordLessLogin': instance.usePasswordLessLogin,
       'securityKeys': instance.securityKeys,