Compare commits

..

No commits in common. "72e6a6a1f62587dc26246e8420804492c7d204d9" and "7bb73c80b07275e2bd3a6b2dee0a80aeed7569bb" have entirely different histories.

60 changed files with 8898 additions and 9191 deletions

View File

@ -735,13 +735,5 @@
"cacheSize": "Cache Size", "cacheSize": "Cache Size",
"cacheDelete": "Clean Cache", "cacheDelete": "Clean Cache",
"cacheDeleteDescription": "Remove the cached images and other resources from your disk, the content will be downloaded from server again.", "cacheDeleteDescription": "Remove the cached images and other resources from your disk, the content will be downloaded from server again.",
"cacheDeleted": "All cache has been cleaned up.", "cacheDeleted": "All cache has been cleaned up."
"userNoDescription": "No description.",
"fieldTimeZone": "Time Zone",
"fieldGender": "Gender",
"fieldPronouns": "Pronouns",
"fieldLocation": "Location",
"fieldLinks": "Links",
"fieldLinkName": "Name",
"fieldLinkUrl": "URL"
} }

View File

@ -733,13 +733,5 @@
"cacheSize": "缓存资源大小", "cacheSize": "缓存资源大小",
"cacheDelete": "清除缓存", "cacheDelete": "清除缓存",
"cacheDeleteDescription": "从磁盘中移除缓存的图片和其他资源,内容将从服务器重新下载。", "cacheDeleteDescription": "从磁盘中移除缓存的图片和其他资源,内容将从服务器重新下载。",
"cacheDeleted": "所有缓存已被清除。", "cacheDeleted": "所有缓存已被清除。"
"userNoDescription": "这个人很懒,没有留下什么……",
"fieldTimeZone": "时区",
"fieldGender": "性别",
"fieldPronouns": "人称代词",
"fieldLocation": "位置",
"fieldLinks": "链接",
"fieldLinkName": "名称",
"fieldLinkUrl": "链接"
} }

View File

@ -733,13 +733,5 @@
"cacheSize": "緩存資源大小", "cacheSize": "緩存資源大小",
"cacheDelete": "清除緩存", "cacheDelete": "清除緩存",
"cacheDeleteDescription": "從磁盤中移除緩存的圖片和其他資源,內容將從服務器重新下載。", "cacheDeleteDescription": "從磁盤中移除緩存的圖片和其他資源,內容將從服務器重新下載。",
"cacheDeleted": "所有緩存已被清除。", "cacheDeleted": "所有緩存已被清除。"
"userNoDescription": "這個人很懶,沒有留下什麼……",
"fieldTimeZone": "時區",
"fieldGender": "性別",
"fieldPronouns": "人稱代詞",
"fieldLocation": "位置",
"fieldLinks": "鏈接",
"fieldLinkName": "名稱",
"fieldLinkUrl": "鏈接"
} }

View File

@ -733,13 +733,5 @@
"cacheSize": "緩存資源大小", "cacheSize": "緩存資源大小",
"cacheDelete": "清除緩存", "cacheDelete": "清除緩存",
"cacheDeleteDescription": "從磁盤中移除緩存的圖片和其他資源,內容將從服務器重新下載。", "cacheDeleteDescription": "從磁盤中移除緩存的圖片和其他資源,內容將從服務器重新下載。",
"cacheDeleted": "所有緩存已被清除。", "cacheDeleted": "所有緩存已被清除。"
"userNoDescription": "這個人很懶,沒有留下什麼……",
"fieldTimeZone": "時區",
"fieldGender": "性別",
"fieldPronouns": "人稱代詞",
"fieldLocation": "位置",
"fieldLinks": "鏈接",
"fieldLinkName": "名稱",
"fieldLinkUrl": "鏈接"
} }

View File

@ -52,14 +52,14 @@ PODS:
- Firebase/Messaging (11.8.0): - Firebase/Messaging (11.8.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseMessaging (~> 11.8.0) - FirebaseMessaging (~> 11.8.0)
- firebase_analytics (11.4.4): - firebase_analytics (11.4.3):
- Firebase/Analytics (= 11.8.0) - Firebase/Analytics (= 11.8.0)
- firebase_core - firebase_core
- Flutter - Flutter
- firebase_core (3.12.1): - firebase_core (3.12.0):
- Firebase/CoreOnly (= 11.8.0) - Firebase/CoreOnly (= 11.8.0)
- Flutter - Flutter
- firebase_messaging (15.2.4): - firebase_messaging (15.2.3):
- Firebase/Messaging (= 11.8.0) - Firebase/Messaging (= 11.8.0)
- firebase_core - firebase_core
- Flutter - Flutter
@ -113,8 +113,6 @@ PODS:
- OrderedSet (~> 6.0.3) - OrderedSet (~> 6.0.3)
- flutter_native_splash (2.4.3): - flutter_native_splash (2.4.3):
- Flutter - Flutter
- flutter_timezone (0.0.1):
- Flutter
- flutter_udid (0.0.1): - flutter_udid (0.0.1):
- Flutter - Flutter
- SAMKeychain - SAMKeychain
@ -124,8 +122,6 @@ PODS:
- gal (1.0.0): - gal (1.0.0):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- geolocator_apple (1.2.0):
- Flutter
- GoogleAppMeasurement (11.8.0): - GoogleAppMeasurement (11.8.0):
- GoogleAppMeasurement/AdIdSupport (= 11.8.0) - GoogleAppMeasurement/AdIdSupport (= 11.8.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
@ -271,11 +267,9 @@ DEPENDENCIES:
- flutter_app_update (from `.symlinks/plugins/flutter_app_update/ios`) - flutter_app_update (from `.symlinks/plugins/flutter_app_update/ios`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`) - flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`) - flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
- gal (from `.symlinks/plugins/gal/darwin`) - gal (from `.symlinks/plugins/gal/darwin`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
- home_widget (from `.symlinks/plugins/home_widget/ios`) - home_widget (from `.symlinks/plugins/home_widget/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- in_app_review (from `.symlinks/plugins/in_app_review/ios`) - in_app_review (from `.symlinks/plugins/in_app_review/ios`)
@ -349,16 +343,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios" :path: ".symlinks/plugins/flutter_inappwebview_ios/ios"
flutter_native_splash: flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios" :path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_timezone:
:path: ".symlinks/plugins/flutter_timezone/ios"
flutter_udid: flutter_udid:
:path: ".symlinks/plugins/flutter_udid/ios" :path: ".symlinks/plugins/flutter_udid/ios"
flutter_webrtc: flutter_webrtc:
:path: ".symlinks/plugins/flutter_webrtc/ios" :path: ".symlinks/plugins/flutter_webrtc/ios"
gal: gal:
:path: ".symlinks/plugins/gal/darwin" :path: ".symlinks/plugins/gal/darwin"
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
home_widget: home_widget:
:path: ".symlinks/plugins/home_widget/ios" :path: ".symlinks/plugins/home_widget/ios"
image_picker_ios: image_picker_ios:
@ -414,9 +404,9 @@ SPEC CHECKSUMS:
file_picker: b159e0c068aef54932bb15dc9fd1571818edaf49 file_picker: b159e0c068aef54932bb15dc9fd1571818edaf49
file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808 file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808
Firebase: d80354ed7f6df5f9aca55e9eb47cc4b634735eaf Firebase: d80354ed7f6df5f9aca55e9eb47cc4b634735eaf
firebase_analytics: e3b6782e70e32b7fa18f7cd233e3201975dd86aa firebase_analytics: 7ec1166af61987fa968766eb11587c562a5650ee
firebase_core: ac395f994af4e28f6a38b59e05a88ca57abeb874 firebase_core: 6e223dfa350b2edceb729cea505eaaef59330682
firebase_messaging: 7e223f4ee7ca053bf4ce43748e84a6d774ec9728 firebase_messaging: 07fde77ae28c08616a1d4d870450efc2b38cf40d
FirebaseAnalytics: 4fd42def128146e24e480e89f310e3d8534ea42b FirebaseAnalytics: 4fd42def128146e24e480e89f310e3d8534ea42b
FirebaseCore: 99fe0c4b44a39f37d99e6404e02009d2db5d718d FirebaseCore: 99fe0c4b44a39f37d99e6404e02009d2db5d718d
FirebaseCoreInternal: df24ce5af28864660ecbd13596fc8dd3a8c34629 FirebaseCoreInternal: df24ce5af28864660ecbd13596fc8dd3a8c34629
@ -426,11 +416,9 @@ SPEC CHECKSUMS:
flutter_app_update: 65f61da626cb111d1b24674abc4b01728d7723bc flutter_app_update: 65f61da626cb111d1b24674abc4b01728d7723bc
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
flutter_native_splash: df59bb2e1421aa0282cb2e95618af4dcb0c56c29 flutter_native_splash: df59bb2e1421aa0282cb2e95618af4dcb0c56c29
flutter_timezone: ac3da59ac941ff1c98a2e1f0293420e020120282
flutter_udid: b2417673f287ee62817a1de3d1643f47b9f508ab flutter_udid: b2417673f287ee62817a1de3d1643f47b9f508ab
flutter_webrtc: 90260f83024b1b96d239a575ea4e3708e79344d1 flutter_webrtc: 90260f83024b1b96d239a575ea4e3708e79344d1
gal: 6a522c75909f1244732d4596d11d6a2f86ff37a5 gal: 6a522c75909f1244732d4596d11d6a2f86ff37a5
geolocator_apple: 9bcea1918ff7f0062d98345d238ae12718acfbc1
GoogleAppMeasurement: fc0817122bd4d4189164f85374e06773b9561896 GoogleAppMeasurement: fc0817122bd4d4189164f85374e06773b9561896
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d

View File

@ -184,7 +184,6 @@ class ChatMessageController extends ChangeNotifier {
} else { } else {
messages.insert(0, message); messages.insert(0, message);
} }
notifyListeners();
await _applyMessage(message); await _applyMessage(message);
notifyListeners(); notifyListeners();

View File

@ -108,7 +108,8 @@ void main() async {
} }
if (!kIsWeb && Platform.isAndroid) { if (!kIsWeb && Platform.isAndroid) {
final ImagePickerPlatform imagePickerImplementation = ImagePickerPlatform.instance; final ImagePickerPlatform imagePickerImplementation =
ImagePickerPlatform.instance;
if (imagePickerImplementation is ImagePickerAndroid) { if (imagePickerImplementation is ImagePickerAndroid) {
imagePickerImplementation.useAndroidPhotoPicker = true; imagePickerImplementation.useAndroidPhotoPicker = true;
} }
@ -227,7 +228,8 @@ class _AppSplashScreenState extends State<_AppSplashScreen> with TrayListener {
if (prefs.containsKey('first_boot_time')) { if (prefs.containsKey('first_boot_time')) {
final rawTime = prefs.getString('first_boot_time'); final rawTime = prefs.getString('first_boot_time');
final time = DateTime.tryParse(rawTime ?? ''); final time = DateTime.tryParse(rawTime ?? '');
if (time != null && time.isBefore(DateTime.now().subtract(const Duration(days: 3)))) { if (time != null &&
time.isBefore(DateTime.now().subtract(const Duration(days: 3)))) {
final inAppReview = InAppReview.instance; final inAppReview = InAppReview.instance;
if (prefs.getBool('rating_requested') == true) return; if (prefs.getBool('rating_requested') == true) return;
if (await inAppReview.isAvailable()) { if (await inAppReview.isAvailable()) {
@ -258,12 +260,18 @@ class _AppSplashScreenState extends State<_AppSplashScreen> with TrayListener {
final remoteVersionString = resp.data?['tag_name'] ?? '0.0.0+0'; final remoteVersionString = resp.data?['tag_name'] ?? '0.0.0+0';
final remoteVersion = Version.parse(remoteVersionString.split('+').first); final remoteVersion = Version.parse(remoteVersionString.split('+').first);
final localVersion = Version.parse(localVersionString.split('+').first); final localVersion = Version.parse(localVersionString.split('+').first);
final remoteBuildNumber = int.tryParse(remoteVersionString.split('+').last) ?? 0; final remoteBuildNumber =
final localBuildNumber = int.tryParse(localVersionString.split('+').last) ?? 0; int.tryParse(remoteVersionString.split('+').last) ?? 0;
logging.info("[Update] Local: $localVersionString, Remote: $remoteVersionString"); final localBuildNumber =
if ((remoteVersion > localVersion || remoteBuildNumber > localBuildNumber) && mounted) { int.tryParse(localVersionString.split('+').last) ?? 0;
logging.info(
"[Update] Local: $localVersionString, Remote: $remoteVersionString");
if ((remoteVersion > localVersion ||
remoteBuildNumber > localBuildNumber) &&
mounted) {
final config = context.read<ConfigProvider>(); final config = context.read<ConfigProvider>();
config.setUpdate(remoteVersionString, resp.data?['body'] ?? 'No changelog'); config.setUpdate(
remoteVersionString, resp.data?['body'] ?? 'No changelog');
logging.info("[Update] Update available: $remoteVersionString"); logging.info("[Update] Update available: $remoteVersionString");
} }
} catch (e) { } catch (e) {
@ -355,7 +363,9 @@ class _AppSplashScreenState extends State<_AppSplashScreen> with TrayListener {
Future<void> _trayInitialization() async { Future<void> _trayInitialization() async {
if (kIsWeb || Platform.isAndroid || Platform.isIOS) return; if (kIsWeb || Platform.isAndroid || Platform.isIOS) return;
final icon = Platform.isWindows ? 'assets/icon/tray-icon.ico' : 'assets/icon/tray-icon.png'; final icon = Platform.isWindows
? 'assets/icon/tray-icon.ico'
: 'assets/icon/tray-icon.png';
final appVersion = await PackageInfo.fromPlatform(); final appVersion = await PackageInfo.fromPlatform();
trayManager.addListener(this); trayManager.addListener(this);

View File

@ -45,7 +45,8 @@ class AccountScreen extends StatelessWidget {
? Stack( ? Stack(
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
AutoResizeUniversalImage(sn.getAttachmentUrl(ua.user!.banner), fit: BoxFit.cover), AutoResizeUniversalImage(sn.getAttachmentUrl(ua.user!.banner),
fit: BoxFit.cover),
Positioned( Positioned(
top: 0, top: 0,
left: 0, left: 0,
@ -79,7 +80,9 @@ class AccountScreen extends StatelessWidget {
], ],
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: ua.isAuthorized ? _AuthorizedAccountScreen() : _UnauthorizedAccountScreen(), child: ua.isAuthorized
? _AuthorizedAccountScreen()
: _UnauthorizedAccountScreen(),
), ),
); );
} }
@ -115,19 +118,15 @@ class _AuthorizedAccountScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic, textBaseline: TextBaseline.alphabetic,
children: [ children: [
Text(ua.user!.nick).textStyle(Theme.of(context).textTheme.titleLarge!), Text(ua.user!.nick)
.textStyle(Theme.of(context).textTheme.titleLarge!),
const Gap(4), const Gap(4),
Text('@${ua.user!.name}').textStyle(Theme.of(context).textTheme.bodySmall!), Text('@${ua.user!.name}')
.textStyle(Theme.of(context).textTheme.bodySmall!),
], ],
), ),
Text( Text(ua.user!.description)
(ua.user!.profile?.description.isNotEmpty ?? false) .textStyle(Theme.of(context).textTheme.bodyMedium!),
? ua.user!.profile!.description
: 'userNoDescription'.tr(),
style: (ua.user!.profile?.description.isEmpty ?? true)
? TextStyle(fontStyle: FontStyle.italic)
: null,
).textStyle(Theme.of(context).textTheme.bodyMedium!),
], ],
), ),
); );
@ -226,7 +225,9 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
child: Icon(Symbols.waving_hand, size: 28), child: Icon(Symbols.waving_hand, size: 28),
), ),
const Gap(8), const Gap(8),
Text('accountIntroTitle').tr().textStyle(Theme.of(context).textTheme.titleLarge!), Text('accountIntroTitle')
.tr()
.textStyle(Theme.of(context).textTheme.titleLarge!),
Text('accountIntroSubtitle').tr(), Text('accountIntroSubtitle').tr(),
], ],
).padding(all: 20), ).padding(all: 20),

View File

@ -6,7 +6,6 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_timezone/flutter_timezone.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:material_symbols_icons/symbols.dart'; import 'package:material_symbols_icons/symbols.dart';
@ -37,16 +36,11 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
final _firstNameController = TextEditingController(); final _firstNameController = TextEditingController();
final _lastNameController = TextEditingController(); final _lastNameController = TextEditingController();
final _descriptionController = TextEditingController(); final _descriptionController = TextEditingController();
final _timezoneController = TextEditingController();
final _genderController = TextEditingController();
final _pronounsController = TextEditingController();
final _locationController = TextEditingController();
final _birthdayController = TextEditingController(); final _birthdayController = TextEditingController();
String? _avatar; String? _avatar;
String? _banner; String? _banner;
DateTime? _birthday; DateTime? _birthday;
List<(String, String)>? _links;
bool _isBusy = false; bool _isBusy = false;
@ -57,18 +51,12 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
final prof = ua.user!; final prof = ua.user!;
_usernameController.text = prof.name; _usernameController.text = prof.name;
_nicknameController.text = prof.nick; _nicknameController.text = prof.nick;
_descriptionController.text = prof.profile!.description; _descriptionController.text = prof.description;
_firstNameController.text = prof.profile!.firstName; _firstNameController.text = prof.profile!.firstName;
_lastNameController.text = prof.profile!.lastName; _lastNameController.text = prof.profile!.lastName;
_timezoneController.text = prof.profile!.timeZone;
_genderController.text = prof.profile!.gender;
_pronounsController.text = prof.profile!.pronouns;
_locationController.text = prof.profile!.location;
_avatar = prof.avatar; _avatar = prof.avatar;
_banner = prof.banner; _banner = prof.banner;
_links = prof.profile!.links.entries.map((ele) => (ele.key, ele.value)).toList(); if (prof.profile!.birthday != null) {
_birthday = prof.profile!.birthday?.toLocal();
if(_birthday != null) {
_birthdayController.text = DateFormat(_kDateFormat).format( _birthdayController.text = DateFormat(_kDateFormat).format(
prof.profile!.birthday!.toLocal(), prof.profile!.birthday!.toLocal(),
); );
@ -178,14 +166,7 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
'description': _descriptionController.value.text, 'description': _descriptionController.value.text,
'first_name': _firstNameController.value.text, 'first_name': _firstNameController.value.text,
'last_name': _lastNameController.value.text, 'last_name': _lastNameController.value.text,
'time_zone': _timezoneController.value.text,
'gender': _genderController.value.text,
'pronouns': _pronounsController.value.text,
'location': _locationController.value.text,
'birthday': _birthday?.toUtc().toIso8601String(), 'birthday': _birthday?.toUtc().toIso8601String(),
'links': {
for (final link in _links!.where((ele) => ele.$1.isNotEmpty && ele.$2.isNotEmpty)) link.$1: link.$2
},
}, },
); );
@ -216,10 +197,6 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
_firstNameController.dispose(); _firstNameController.dispose();
_lastNameController.dispose(); _lastNameController.dispose();
_descriptionController.dispose(); _descriptionController.dispose();
_timezoneController.dispose();
_genderController.dispose();
_pronounsController.dispose();
_locationController.dispose();
_birthdayController.dispose(); _birthdayController.dispose();
super.dispose(); super.dispose();
} }
@ -285,7 +262,6 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
).padding(horizontal: padding), ).padding(horizontal: padding),
const Gap(8 + 28), const Gap(8 + 28),
Column( Column(
spacing: 4,
children: [ children: [
TextField( TextField(
readOnly: true, readOnly: true,
@ -295,16 +271,16 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
labelText: 'fieldUsername'.tr(), labelText: 'fieldUsername'.tr(),
helperText: 'fieldUsernameCannotEditHint'.tr(), helperText: 'fieldUsernameCannotEditHint'.tr(),
), ),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
), ),
const Gap(4),
TextField( TextField(
controller: _nicknameController, controller: _nicknameController,
decoration: InputDecoration( decoration: InputDecoration(
border: const UnderlineInputBorder(), border: const UnderlineInputBorder(),
labelText: 'fieldNickname'.tr(), labelText: 'fieldNickname'.tr(),
), ),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
), ),
const Gap(4),
Row( Row(
children: [ children: [
Flexible( Flexible(
@ -315,7 +291,6 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
border: const UnderlineInputBorder(), border: const UnderlineInputBorder(),
labelText: 'fieldFirstName'.tr(), labelText: 'fieldFirstName'.tr(),
), ),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
), ),
), ),
const Gap(8), const Gap(8),
@ -327,38 +302,11 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
border: const UnderlineInputBorder(), border: const UnderlineInputBorder(),
labelText: 'fieldLastName'.tr(), labelText: 'fieldLastName'.tr(),
), ),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
), ),
), ),
], ],
), ),
Row(
children: [
Flexible(
flex: 1,
child: TextField(
controller: _genderController,
decoration: InputDecoration(
border: const UnderlineInputBorder(),
labelText: 'fieldGender'.tr(),
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
),
const Gap(4), const Gap(4),
Flexible(
flex: 1,
child: TextField(
controller: _pronounsController,
decoration: InputDecoration(
border: const UnderlineInputBorder(),
labelText: 'fieldPronouns'.tr(),
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
),
],
),
TextField( TextField(
controller: _descriptionController, controller: _descriptionController,
keyboardType: TextInputType.multiline, keyboardType: TextInputType.multiline,
@ -368,51 +316,8 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
border: const UnderlineInputBorder(), border: const UnderlineInputBorder(),
labelText: 'fieldDescription'.tr(), labelText: 'fieldDescription'.tr(),
), ),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: TextField(
controller: _timezoneController,
decoration: InputDecoration(
border: const UnderlineInputBorder(),
labelText: 'fieldTimeZone'.tr(),
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
), ),
const Gap(4), const Gap(4),
StyledWidget(IconButton(
icon: const Icon(Symbols.calendar_month),
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
onPressed: () async {
_timezoneController.text = await FlutterTimezone.getLocalTimezone();
},
)).padding(top: 6),
const Gap(4),
StyledWidget(IconButton(
icon: const Icon(Symbols.clear),
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
onPressed: () {
_timezoneController.clear();
},
)).padding(top: 6),
],
),
TextField(
controller: _locationController,
decoration: InputDecoration(
border: const UnderlineInputBorder(),
labelText: 'fieldLocation'.tr(),
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
TextField( TextField(
controller: _birthdayController, controller: _birthdayController,
readOnly: true, readOnly: true,
@ -422,75 +327,6 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
), ),
onTap: () => _selectBirthday(), onTap: () => _selectBirthday(),
), ),
if (_links != null)
Card(
margin: const EdgeInsets.only(top: 16, bottom: 4),
child: Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: Text(
'fieldLinks'.tr(),
style: Theme.of(context).textTheme.titleMedium!.copyWith(fontSize: 17),
),
),
IconButton(
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
icon: const Icon(Symbols.add),
onPressed: () {
setState(() => _links!.add(('', '')));
},
),
],
),
const Gap(8),
for (var idx = 0; idx < _links!.length; idx++)
Row(
children: [
Flexible(
flex: 1,
child: TextFormField(
initialValue: _links![idx].$1,
decoration: InputDecoration(
isDense: true,
border: const OutlineInputBorder(),
labelText: 'fieldLinkName'.tr(),
),
onChanged: (value) {
_links![idx] = (value, _links![idx].$2);
},
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
),
const Gap(8),
Flexible(
flex: 1,
child: TextFormField(
initialValue: _links![idx].$2,
decoration: InputDecoration(
isDense: true,
border: const OutlineInputBorder(),
labelText: 'fieldLinkUrl'.tr(),
),
onChanged: (value) {
_links![idx] = (_links![idx].$1, value);
},
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
),
],
),
],
),
),
),
], ],
).padding(horizontal: padding + 8), ).padding(horizontal: padding + 8),
const Gap(12), const Gap(12),
@ -504,7 +340,6 @@ class _ProfileEditScreenState extends State<ProfileEditScreen> {
), ),
], ],
).padding(horizontal: padding), ).padding(horizontal: padding),
Gap(MediaQuery.of(context).padding.bottom),
], ],
), ),
), ),

View File

@ -406,7 +406,7 @@ class _UserScreenState extends State<UserScreen>
], ],
).padding(right: 8), ).padding(right: 8),
const Gap(12), const Gap(12),
Text(_account!.profile!.description).padding(horizontal: 8), Text(_account!.description).padding(horizontal: 8),
const Gap(4), const Gap(4),
Card( Card(
child: Row( child: Row(

View File

@ -97,7 +97,7 @@ class _AccountPublisherEditScreenState extends State<AccountPublisherEditScreen>
_banner = ua.user!.banner; _banner = ua.user!.banner;
_nickController.text = ua.user!.nick; _nickController.text = ua.user!.nick;
_nameController.text = ua.user!.name; _nameController.text = ua.user!.name;
_descriptionController.text = ua.user!.profile!.description; _descriptionController.text = ua.user!.description;
setState(() {}); setState(() {});
} }

View File

@ -109,7 +109,7 @@ class _PublisherNewPersonalState extends State<_PublisherNewPersonal> {
_nameController.text = ua.user!.name; _nameController.text = ua.user!.name;
_nickController.text = ua.user!.nick; _nickController.text = ua.user!.nick;
_descriptionController.text = ua.user!.profile!.description; _descriptionController.text = ua.user!.description;
} }
@override @override

View File

@ -4,7 +4,7 @@ part 'account.freezed.dart';
part 'account.g.dart'; part 'account.g.dart';
@freezed @freezed
abstract class SnAccount with _$SnAccount { class SnAccount with _$SnAccount {
const SnAccount._(); const SnAccount._();
const factory SnAccount({ const factory SnAccount({
@ -16,6 +16,7 @@ abstract class SnAccount with _$SnAccount {
required List<SnAccountContact>? contacts, required List<SnAccountContact>? contacts,
@Default("") String avatar, @Default("") String avatar,
@Default("") String banner, @Default("") String banner,
required String description,
required String name, required String name,
required String nick, required String nick,
@Default({}) Map<String, dynamic> permNodes, @Default({}) Map<String, dynamic> permNodes,
@ -34,7 +35,7 @@ abstract class SnAccount with _$SnAccount {
} }
@freezed @freezed
abstract class SnAccountContact with _$SnAccountContact { class SnAccountContact with _$SnAccountContact {
const factory SnAccountContact({ const factory SnAccountContact({
required int accountId, required int accountId,
required String content, required String content,
@ -53,24 +54,18 @@ abstract class SnAccountContact with _$SnAccountContact {
} }
@freezed @freezed
abstract class SnAccountProfile with _$SnAccountProfile { class SnAccountProfile with _$SnAccountProfile {
const factory SnAccountProfile({ const factory SnAccountProfile({
required int id, required int id,
required int accountId,
required DateTime? birthday,
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt,
required DateTime? deletedAt, required DateTime? deletedAt,
required int experience,
required String firstName, required String firstName,
required String lastName, required String lastName,
required String description,
required String timeZone,
required String location,
required String pronouns,
required String gender,
@Default({}) Map<String, String> links,
required int experience,
required DateTime? lastSeenAt, required DateTime? lastSeenAt,
required DateTime? birthday, required DateTime updatedAt,
required int accountId,
}) = _SnAccountProfile; }) = _SnAccountProfile;
factory SnAccountProfile.fromJson(Map<String, Object?> json) => factory SnAccountProfile.fromJson(Map<String, Object?> json) =>
@ -78,7 +73,7 @@ abstract class SnAccountProfile with _$SnAccountProfile {
} }
@freezed @freezed
abstract class SnRelationship with _$SnRelationship { class SnRelationship with _$SnRelationship {
const factory SnRelationship({ const factory SnRelationship({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -97,7 +92,7 @@ abstract class SnRelationship with _$SnRelationship {
} }
@freezed @freezed
abstract class SnAccountBadge with _$SnAccountBadge { class SnAccountBadge with _$SnAccountBadge {
const factory SnAccountBadge({ const factory SnAccountBadge({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -113,7 +108,7 @@ abstract class SnAccountBadge with _$SnAccountBadge {
} }
@freezed @freezed
abstract class SnAccountStatusInfo with _$SnAccountStatusInfo { class SnAccountStatusInfo with _$SnAccountStatusInfo {
const factory SnAccountStatusInfo({ const factory SnAccountStatusInfo({
required bool isDisturbable, required bool isDisturbable,
required bool isOnline, required bool isOnline,
@ -126,7 +121,7 @@ abstract class SnAccountStatusInfo with _$SnAccountStatusInfo {
} }
@freezed @freezed
abstract class SnAbuseReport with _$SnAbuseReport { class SnAbuseReport with _$SnAbuseReport {
const factory SnAbuseReport({ const factory SnAbuseReport({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@ part of 'account.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount( _$SnAccountImpl _$$SnAccountImplFromJson(Map<String, dynamic> json) =>
_$SnAccountImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -21,6 +22,7 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
.toList(), .toList(),
avatar: json['avatar'] as String? ?? "", avatar: json['avatar'] as String? ?? "",
banner: json['banner'] as String? ?? "", banner: json['banner'] as String? ?? "",
description: json['description'] as String,
name: json['name'] as String, name: json['name'] as String,
nick: json['nick'] as String, nick: json['nick'] as String,
permNodes: json['perm_nodes'] as Map<String, dynamic>? ?? const {}, permNodes: json['perm_nodes'] as Map<String, dynamic>? ?? const {},
@ -41,7 +43,7 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
automatedId: (json['automated_id'] as num?)?.toInt(), automatedId: (json['automated_id'] as num?)?.toInt(),
); );
Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) => Map<String, dynamic> _$$SnAccountImplToJson(_$SnAccountImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -51,6 +53,7 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
'contacts': instance.contacts?.map((e) => e.toJson()).toList(), 'contacts': instance.contacts?.map((e) => e.toJson()).toList(),
'avatar': instance.avatar, 'avatar': instance.avatar,
'banner': instance.banner, 'banner': instance.banner,
'description': instance.description,
'name': instance.name, 'name': instance.name,
'nick': instance.nick, 'nick': instance.nick,
'perm_nodes': instance.permNodes, 'perm_nodes': instance.permNodes,
@ -64,8 +67,9 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
'automated_id': instance.automatedId, 'automated_id': instance.automatedId,
}; };
_SnAccountContact _$SnAccountContactFromJson(Map<String, dynamic> json) => _$SnAccountContactImpl _$$SnAccountContactImplFromJson(
_SnAccountContact( Map<String, dynamic> json) =>
_$SnAccountContactImpl(
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
content: json['content'] as String, content: json['content'] as String,
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
@ -82,7 +86,8 @@ _SnAccountContact _$SnAccountContactFromJson(Map<String, dynamic> json) =>
: DateTime.parse(json['verified_at'] as String), : DateTime.parse(json['verified_at'] as String),
); );
Map<String, dynamic> _$SnAccountContactToJson(_SnAccountContact instance) => Map<String, dynamic> _$$SnAccountContactImplToJson(
_$SnAccountContactImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'account_id': instance.accountId, 'account_id': instance.accountId,
'content': instance.content, 'content': instance.content,
@ -96,57 +101,44 @@ Map<String, dynamic> _$SnAccountContactToJson(_SnAccountContact instance) =>
'verified_at': instance.verifiedAt?.toIso8601String(), 'verified_at': instance.verifiedAt?.toIso8601String(),
}; };
_SnAccountProfile _$SnAccountProfileFromJson(Map<String, dynamic> json) => _$SnAccountProfileImpl _$$SnAccountProfileImplFromJson(
_SnAccountProfile( Map<String, dynamic> json) =>
_$SnAccountProfileImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), accountId: (json['account_id'] as num).toInt(),
updatedAt: DateTime.parse(json['updated_at'] as String),
deletedAt: json['deleted_at'] == null
? null
: DateTime.parse(json['deleted_at'] as String),
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
description: json['description'] as String,
timeZone: json['time_zone'] as String,
location: json['location'] as String,
pronouns: json['pronouns'] as String,
gender: json['gender'] as String,
links: (json['links'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, e as String),
) ??
const {},
experience: (json['experience'] as num).toInt(),
lastSeenAt: json['last_seen_at'] == null
? null
: DateTime.parse(json['last_seen_at'] as String),
birthday: json['birthday'] == null birthday: json['birthday'] == null
? null ? null
: DateTime.parse(json['birthday'] as String), : DateTime.parse(json['birthday'] as String),
accountId: (json['account_id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String),
deletedAt: json['deleted_at'] == null
? null
: DateTime.parse(json['deleted_at'] as String),
experience: (json['experience'] as num).toInt(),
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
lastSeenAt: json['last_seen_at'] == null
? null
: DateTime.parse(json['last_seen_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
); );
Map<String, dynamic> _$SnAccountProfileToJson(_SnAccountProfile instance) => Map<String, dynamic> _$$SnAccountProfileImplToJson(
_$SnAccountProfileImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'account_id': instance.accountId,
'birthday': instance.birthday?.toIso8601String(),
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'deleted_at': instance.deletedAt?.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(),
'experience': instance.experience,
'first_name': instance.firstName, 'first_name': instance.firstName,
'last_name': instance.lastName, 'last_name': instance.lastName,
'description': instance.description,
'time_zone': instance.timeZone,
'location': instance.location,
'pronouns': instance.pronouns,
'gender': instance.gender,
'links': instance.links,
'experience': instance.experience,
'last_seen_at': instance.lastSeenAt?.toIso8601String(), 'last_seen_at': instance.lastSeenAt?.toIso8601String(),
'birthday': instance.birthday?.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
'account_id': instance.accountId,
}; };
_SnRelationship _$SnRelationshipFromJson(Map<String, dynamic> json) => _$SnRelationshipImpl _$$SnRelationshipImplFromJson(Map<String, dynamic> json) =>
_SnRelationship( _$SnRelationshipImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -165,7 +157,8 @@ _SnRelationship _$SnRelationshipFromJson(Map<String, dynamic> json) =>
permNodes: json['perm_nodes'] as Map<String, dynamic>? ?? const {}, permNodes: json['perm_nodes'] as Map<String, dynamic>? ?? const {},
); );
Map<String, dynamic> _$SnRelationshipToJson(_SnRelationship instance) => Map<String, dynamic> _$$SnRelationshipImplToJson(
_$SnRelationshipImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -179,8 +172,8 @@ Map<String, dynamic> _$SnRelationshipToJson(_SnRelationship instance) =>
'perm_nodes': instance.permNodes, 'perm_nodes': instance.permNodes,
}; };
_SnAccountBadge _$SnAccountBadgeFromJson(Map<String, dynamic> json) => _$SnAccountBadgeImpl _$$SnAccountBadgeImplFromJson(Map<String, dynamic> json) =>
_SnAccountBadge( _$SnAccountBadgeImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -190,7 +183,8 @@ _SnAccountBadge _$SnAccountBadgeFromJson(Map<String, dynamic> json) =>
metadata: json['metadata'] as Map<String, dynamic>? ?? const {}, metadata: json['metadata'] as Map<String, dynamic>? ?? const {},
); );
Map<String, dynamic> _$SnAccountBadgeToJson(_SnAccountBadge instance) => Map<String, dynamic> _$$SnAccountBadgeImplToJson(
_$SnAccountBadgeImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -201,8 +195,9 @@ Map<String, dynamic> _$SnAccountBadgeToJson(_SnAccountBadge instance) =>
'metadata': instance.metadata, 'metadata': instance.metadata,
}; };
_SnAccountStatusInfo _$SnAccountStatusInfoFromJson(Map<String, dynamic> json) => _$SnAccountStatusInfoImpl _$$SnAccountStatusInfoImplFromJson(
_SnAccountStatusInfo( Map<String, dynamic> json) =>
_$SnAccountStatusInfoImpl(
isDisturbable: json['is_disturbable'] as bool, isDisturbable: json['is_disturbable'] as bool,
isOnline: json['is_online'] as bool, isOnline: json['is_online'] as bool,
lastSeenAt: json['last_seen_at'] == null lastSeenAt: json['last_seen_at'] == null
@ -211,8 +206,8 @@ _SnAccountStatusInfo _$SnAccountStatusInfoFromJson(Map<String, dynamic> json) =>
status: json['status'], status: json['status'],
); );
Map<String, dynamic> _$SnAccountStatusInfoToJson( Map<String, dynamic> _$$SnAccountStatusInfoImplToJson(
_SnAccountStatusInfo instance) => _$SnAccountStatusInfoImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'is_disturbable': instance.isDisturbable, 'is_disturbable': instance.isDisturbable,
'is_online': instance.isOnline, 'is_online': instance.isOnline,
@ -220,8 +215,8 @@ Map<String, dynamic> _$SnAccountStatusInfoToJson(
'status': instance.status, 'status': instance.status,
}; };
_SnAbuseReport _$SnAbuseReportFromJson(Map<String, dynamic> json) => _$SnAbuseReportImpl _$$SnAbuseReportImplFromJson(Map<String, dynamic> json) =>
_SnAbuseReport( _$SnAbuseReportImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -234,7 +229,7 @@ _SnAbuseReport _$SnAbuseReportFromJson(Map<String, dynamic> json) =>
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnAbuseReportToJson(_SnAbuseReport instance) => Map<String, dynamic> _$$SnAbuseReportImplToJson(_$SnAbuseReportImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -12,7 +12,7 @@ enum SnMediaType {
} }
@freezed @freezed
abstract class SnAttachment with _$SnAttachment { class SnAttachment with _$SnAttachment {
const SnAttachment._(); const SnAttachment._();
const factory SnAttachment({ const factory SnAttachment({
@ -65,7 +65,7 @@ abstract class SnAttachment with _$SnAttachment {
} }
@freezed @freezed
abstract class SnAttachmentFragment with _$SnAttachmentFragment { class SnAttachmentFragment with _$SnAttachmentFragment {
const SnAttachmentFragment._(); const SnAttachmentFragment._();
const factory SnAttachmentFragment({ const factory SnAttachmentFragment({
@ -96,7 +96,7 @@ abstract class SnAttachmentFragment with _$SnAttachmentFragment {
} }
@freezed @freezed
abstract class SnAttachmentPool with _$SnAttachmentPool { class SnAttachmentPool with _$SnAttachmentPool {
const factory SnAttachmentPool({ const factory SnAttachmentPool({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -113,7 +113,7 @@ abstract class SnAttachmentPool with _$SnAttachmentPool {
} }
@freezed @freezed
abstract class SnAttachmentDestination with _$SnAttachmentDestination { class SnAttachmentDestination with _$SnAttachmentDestination {
const factory SnAttachmentDestination({ const factory SnAttachmentDestination({
@Default(0) int id, @Default(0) int id,
required String type, required String type,
@ -126,7 +126,7 @@ abstract class SnAttachmentDestination with _$SnAttachmentDestination {
} }
@freezed @freezed
abstract class SnAttachmentBoost with _$SnAttachmentBoost { class SnAttachmentBoost with _$SnAttachmentBoost {
const factory SnAttachmentBoost({ const factory SnAttachmentBoost({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -143,7 +143,7 @@ abstract class SnAttachmentBoost with _$SnAttachmentBoost {
} }
@freezed @freezed
abstract class SnSticker with _$SnSticker { class SnSticker with _$SnSticker {
const factory SnSticker({ const factory SnSticker({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -162,7 +162,7 @@ abstract class SnSticker with _$SnSticker {
} }
@freezed @freezed
abstract class SnStickerPack with _$SnStickerPack { class SnStickerPack with _$SnStickerPack {
const factory SnStickerPack({ const factory SnStickerPack({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -179,7 +179,7 @@ abstract class SnStickerPack with _$SnStickerPack {
} }
@freezed @freezed
abstract class SnAttachmentBilling with _$SnAttachmentBilling { class SnAttachmentBilling with _$SnAttachmentBilling {
const factory SnAttachmentBilling({ const factory SnAttachmentBilling({
required int currentBytes, required int currentBytes,
required int discountFileSize, required int discountFileSize,

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@ part of 'attachment.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnAttachment _$SnAttachmentFromJson(Map<String, dynamic> json) => _$SnAttachmentImpl _$$SnAttachmentImplFromJson(Map<String, dynamic> json) =>
_SnAttachment( _$SnAttachmentImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -57,7 +57,7 @@ _SnAttachment _$SnAttachmentFromJson(Map<String, dynamic> json) =>
metadata: json['metadata'] as Map<String, dynamic>? ?? const {}, metadata: json['metadata'] as Map<String, dynamic>? ?? const {},
); );
Map<String, dynamic> _$SnAttachmentToJson(_SnAttachment instance) => Map<String, dynamic> _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -92,9 +92,9 @@ Map<String, dynamic> _$SnAttachmentToJson(_SnAttachment instance) =>
'metadata': instance.metadata, 'metadata': instance.metadata,
}; };
_SnAttachmentFragment _$SnAttachmentFragmentFromJson( _$SnAttachmentFragmentImpl _$$SnAttachmentFragmentImplFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_SnAttachmentFragment( _$SnAttachmentFragmentImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -119,8 +119,8 @@ _SnAttachmentFragment _$SnAttachmentFragmentFromJson(
const [], const [],
); );
Map<String, dynamic> _$SnAttachmentFragmentToJson( Map<String, dynamic> _$$SnAttachmentFragmentImplToJson(
_SnAttachmentFragment instance) => _$SnAttachmentFragmentImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -138,8 +138,9 @@ Map<String, dynamic> _$SnAttachmentFragmentToJson(
'file_chunks_missing': instance.fileChunksMissing, 'file_chunks_missing': instance.fileChunksMissing,
}; };
_SnAttachmentPool _$SnAttachmentPoolFromJson(Map<String, dynamic> json) => _$SnAttachmentPoolImpl _$$SnAttachmentPoolImplFromJson(
_SnAttachmentPool( Map<String, dynamic> json) =>
_$SnAttachmentPoolImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -153,7 +154,8 @@ _SnAttachmentPool _$SnAttachmentPoolFromJson(Map<String, dynamic> json) =>
accountId: (json['account_id'] as num?)?.toInt(), accountId: (json['account_id'] as num?)?.toInt(),
); );
Map<String, dynamic> _$SnAttachmentPoolToJson(_SnAttachmentPool instance) => Map<String, dynamic> _$$SnAttachmentPoolImplToJson(
_$SnAttachmentPoolImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -166,9 +168,9 @@ Map<String, dynamic> _$SnAttachmentPoolToJson(_SnAttachmentPool instance) =>
'account_id': instance.accountId, 'account_id': instance.accountId,
}; };
_SnAttachmentDestination _$SnAttachmentDestinationFromJson( _$SnAttachmentDestinationImpl _$$SnAttachmentDestinationImplFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_SnAttachmentDestination( _$SnAttachmentDestinationImpl(
id: (json['id'] as num?)?.toInt() ?? 0, id: (json['id'] as num?)?.toInt() ?? 0,
type: json['type'] as String, type: json['type'] as String,
label: json['label'] as String, label: json['label'] as String,
@ -176,8 +178,8 @@ _SnAttachmentDestination _$SnAttachmentDestinationFromJson(
isBoost: json['is_boost'] as bool, isBoost: json['is_boost'] as bool,
); );
Map<String, dynamic> _$SnAttachmentDestinationToJson( Map<String, dynamic> _$$SnAttachmentDestinationImplToJson(
_SnAttachmentDestination instance) => _$SnAttachmentDestinationImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'type': instance.type, 'type': instance.type,
@ -186,8 +188,9 @@ Map<String, dynamic> _$SnAttachmentDestinationToJson(
'is_boost': instance.isBoost, 'is_boost': instance.isBoost,
}; };
_SnAttachmentBoost _$SnAttachmentBoostFromJson(Map<String, dynamic> json) => _$SnAttachmentBoostImpl _$$SnAttachmentBoostImplFromJson(
_SnAttachmentBoost( Map<String, dynamic> json) =>
_$SnAttachmentBoostImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -202,7 +205,8 @@ _SnAttachmentBoost _$SnAttachmentBoostFromJson(Map<String, dynamic> json) =>
account: (json['account'] as num).toInt(), account: (json['account'] as num).toInt(),
); );
Map<String, dynamic> _$SnAttachmentBoostToJson(_SnAttachmentBoost instance) => Map<String, dynamic> _$$SnAttachmentBoostImplToJson(
_$SnAttachmentBoostImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -215,7 +219,8 @@ Map<String, dynamic> _$SnAttachmentBoostToJson(_SnAttachmentBoost instance) =>
'account': instance.account, 'account': instance.account,
}; };
_SnSticker _$SnStickerFromJson(Map<String, dynamic> json) => _SnSticker( _$SnStickerImpl _$$SnStickerImplFromJson(Map<String, dynamic> json) =>
_$SnStickerImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -232,7 +237,7 @@ _SnSticker _$SnStickerFromJson(Map<String, dynamic> json) => _SnSticker(
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnStickerToJson(_SnSticker instance) => Map<String, dynamic> _$$SnStickerImplToJson(_$SnStickerImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -247,8 +252,8 @@ Map<String, dynamic> _$SnStickerToJson(_SnSticker instance) =>
'account_id': instance.accountId, 'account_id': instance.accountId,
}; };
_SnStickerPack _$SnStickerPackFromJson(Map<String, dynamic> json) => _$SnStickerPackImpl _$$SnStickerPackImplFromJson(Map<String, dynamic> json) =>
_SnStickerPack( _$SnStickerPackImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -264,7 +269,7 @@ _SnStickerPack _$SnStickerPackFromJson(Map<String, dynamic> json) =>
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnStickerPackToJson(_SnStickerPack instance) => Map<String, dynamic> _$$SnStickerPackImplToJson(_$SnStickerPackImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -277,15 +282,16 @@ Map<String, dynamic> _$SnStickerPackToJson(_SnStickerPack instance) =>
'account_id': instance.accountId, 'account_id': instance.accountId,
}; };
_SnAttachmentBilling _$SnAttachmentBillingFromJson(Map<String, dynamic> json) => _$SnAttachmentBillingImpl _$$SnAttachmentBillingImplFromJson(
_SnAttachmentBilling( Map<String, dynamic> json) =>
_$SnAttachmentBillingImpl(
currentBytes: (json['current_bytes'] as num).toInt(), currentBytes: (json['current_bytes'] as num).toInt(),
discountFileSize: (json['discount_file_size'] as num).toInt(), discountFileSize: (json['discount_file_size'] as num).toInt(),
includedRatio: (json['included_ratio'] as num).toDouble(), includedRatio: (json['included_ratio'] as num).toDouble(),
); );
Map<String, dynamic> _$SnAttachmentBillingToJson( Map<String, dynamic> _$$SnAttachmentBillingImplToJson(
_SnAttachmentBilling instance) => _$SnAttachmentBillingImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'current_bytes': instance.currentBytes, 'current_bytes': instance.currentBytes,
'discount_file_size': instance.discountFileSize, 'discount_file_size': instance.discountFileSize,

View File

@ -4,7 +4,7 @@ part 'auth.freezed.dart';
part 'auth.g.dart'; part 'auth.g.dart';
@freezed @freezed
abstract class SnAuthResult with _$SnAuthResult { class SnAuthResult with _$SnAuthResult {
const factory SnAuthResult({ const factory SnAuthResult({
required bool isFinished, required bool isFinished,
required SnAuthTicket? ticket, required SnAuthTicket? ticket,
@ -15,7 +15,7 @@ abstract class SnAuthResult with _$SnAuthResult {
} }
@freezed @freezed
abstract class SnAuthTicket with _$SnAuthTicket { class SnAuthTicket with _$SnAuthTicket {
const factory SnAuthTicket({ const factory SnAuthTicket({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -41,7 +41,7 @@ abstract class SnAuthTicket with _$SnAuthTicket {
} }
@freezed @freezed
abstract class SnAuthFactor with _$SnAuthFactor { class SnAuthFactor with _$SnAuthFactor {
const factory SnAuthFactor({ const factory SnAuthFactor({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

File diff suppressed because it is too large Load Diff

View File

@ -6,22 +6,22 @@ part of 'auth.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnAuthResult _$SnAuthResultFromJson(Map<String, dynamic> json) => _$SnAuthResultImpl _$$SnAuthResultImplFromJson(Map<String, dynamic> json) =>
_SnAuthResult( _$SnAuthResultImpl(
isFinished: json['is_finished'] as bool, isFinished: json['is_finished'] as bool,
ticket: json['ticket'] == null ticket: json['ticket'] == null
? null ? null
: SnAuthTicket.fromJson(json['ticket'] as Map<String, dynamic>), : SnAuthTicket.fromJson(json['ticket'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$SnAuthResultToJson(_SnAuthResult instance) => Map<String, dynamic> _$$SnAuthResultImplToJson(_$SnAuthResultImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'is_finished': instance.isFinished, 'is_finished': instance.isFinished,
'ticket': instance.ticket?.toJson(), 'ticket': instance.ticket?.toJson(),
}; };
_SnAuthTicket _$SnAuthTicketFromJson(Map<String, dynamic> json) => _$SnAuthTicketImpl _$$SnAuthTicketImplFromJson(Map<String, dynamic> json) =>
_SnAuthTicket( _$SnAuthTicketImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -52,7 +52,7 @@ _SnAuthTicket _$SnAuthTicketFromJson(Map<String, dynamic> json) =>
const [], const [],
); );
Map<String, dynamic> _$SnAuthTicketToJson(_SnAuthTicket instance) => Map<String, dynamic> _$$SnAuthTicketImplToJson(_$SnAuthTicketImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -73,8 +73,8 @@ Map<String, dynamic> _$SnAuthTicketToJson(_SnAuthTicket instance) =>
'factor_trail': instance.factorTrail, 'factor_trail': instance.factorTrail,
}; };
_SnAuthFactor _$SnAuthFactorFromJson(Map<String, dynamic> json) => _$SnAuthFactorImpl _$$SnAuthFactorImplFromJson(Map<String, dynamic> json) =>
_SnAuthFactor( _$SnAuthFactorImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -86,7 +86,7 @@ _SnAuthFactor _$SnAuthFactorFromJson(Map<String, dynamic> json) =>
accountId: (json['account_id'] as num?)?.toInt(), accountId: (json['account_id'] as num?)?.toInt(),
); );
Map<String, dynamic> _$SnAuthFactorToJson(_SnAuthFactor instance) => Map<String, dynamic> _$$SnAuthFactorImplToJson(_$SnAuthFactorImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -8,7 +8,7 @@ part 'chat.freezed.dart';
part 'chat.g.dart'; part 'chat.g.dart';
@freezed @freezed
abstract class SnChannel with _$SnChannel { class SnChannel with _$SnChannel {
const SnChannel._(); const SnChannel._();
const factory SnChannel({ const factory SnChannel({
@ -37,7 +37,7 @@ abstract class SnChannel with _$SnChannel {
} }
@freezed @freezed
abstract class SnChannelMember with _$SnChannelMember { class SnChannelMember with _$SnChannelMember {
const SnChannelMember._(); const SnChannelMember._();
const factory SnChannelMember({ const factory SnChannelMember({
@ -61,7 +61,7 @@ abstract class SnChannelMember with _$SnChannelMember {
} }
@freezed @freezed
abstract class SnChatMessage with _$SnChatMessage { class SnChatMessage with _$SnChatMessage {
const SnChatMessage._(); const SnChatMessage._();
const factory SnChatMessage({ const factory SnChatMessage({
@ -86,7 +86,7 @@ abstract class SnChatMessage with _$SnChatMessage {
} }
@freezed @freezed
abstract class SnChatMessagePreload with _$SnChatMessagePreload { class SnChatMessagePreload with _$SnChatMessagePreload {
const SnChatMessagePreload._(); const SnChatMessagePreload._();
const factory SnChatMessagePreload({ const factory SnChatMessagePreload({
@ -99,7 +99,7 @@ abstract class SnChatMessagePreload with _$SnChatMessagePreload {
} }
@freezed @freezed
abstract class SnChatCall with _$SnChatCall { class SnChatCall with _$SnChatCall {
const factory SnChatCall({ const factory SnChatCall({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@ part of 'chat.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnChannel _$SnChannelFromJson(Map<String, dynamic> json) => _SnChannel( _$SnChannelImpl _$$SnChannelImplFromJson(Map<String, dynamic> json) =>
_$SnChannelImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -30,7 +31,7 @@ _SnChannel _$SnChannelFromJson(Map<String, dynamic> json) => _SnChannel(
isCommunity: json['is_community'] as bool, isCommunity: json['is_community'] as bool,
); );
Map<String, dynamic> _$SnChannelToJson(_SnChannel instance) => Map<String, dynamic> _$$SnChannelImplToJson(_$SnChannelImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -49,8 +50,9 @@ Map<String, dynamic> _$SnChannelToJson(_SnChannel instance) =>
'is_community': instance.isCommunity, 'is_community': instance.isCommunity,
}; };
_SnChannelMember _$SnChannelMemberFromJson(Map<String, dynamic> json) => _$SnChannelMemberImpl _$$SnChannelMemberImplFromJson(
_SnChannelMember( Map<String, dynamic> json) =>
_$SnChannelMemberImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -72,7 +74,8 @@ _SnChannelMember _$SnChannelMemberFromJson(Map<String, dynamic> json) =>
events: json['events'], events: json['events'],
); );
Map<String, dynamic> _$SnChannelMemberToJson(_SnChannelMember instance) => Map<String, dynamic> _$$SnChannelMemberImplToJson(
_$SnChannelMemberImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -89,8 +92,8 @@ Map<String, dynamic> _$SnChannelMemberToJson(_SnChannelMember instance) =>
'events': instance.events, 'events': instance.events,
}; };
_SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) => _$SnChatMessageImpl _$$SnChatMessageImplFromJson(Map<String, dynamic> json) =>
_SnChatMessage( _$SnChatMessageImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -112,7 +115,7 @@ _SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) =>
json['preload'] as Map<String, dynamic>), json['preload'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$SnChatMessageToJson(_SnChatMessage instance) => Map<String, dynamic> _$$SnChatMessageImplToJson(_$SnChatMessageImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -130,9 +133,9 @@ Map<String, dynamic> _$SnChatMessageToJson(_SnChatMessage instance) =>
'preload': instance.preload?.toJson(), 'preload': instance.preload?.toJson(),
}; };
_SnChatMessagePreload _$SnChatMessagePreloadFromJson( _$SnChatMessagePreloadImpl _$$SnChatMessagePreloadImplFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_SnChatMessagePreload( _$SnChatMessagePreloadImpl(
attachments: (json['attachments'] as List<dynamic>?) attachments: (json['attachments'] as List<dynamic>?)
?.map((e) => e == null ?.map((e) => e == null
? null ? null
@ -143,14 +146,15 @@ _SnChatMessagePreload _$SnChatMessagePreloadFromJson(
: SnChatMessage.fromJson(json['quote_event'] as Map<String, dynamic>), : SnChatMessage.fromJson(json['quote_event'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$SnChatMessagePreloadToJson( Map<String, dynamic> _$$SnChatMessagePreloadImplToJson(
_SnChatMessagePreload instance) => _$SnChatMessagePreloadImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'attachments': instance.attachments?.map((e) => e?.toJson()).toList(), 'attachments': instance.attachments?.map((e) => e?.toJson()).toList(),
'quote_event': instance.quoteEvent?.toJson(), 'quote_event': instance.quoteEvent?.toJson(),
}; };
_SnChatCall _$SnChatCallFromJson(Map<String, dynamic> json) => _SnChatCall( _$SnChatCallImpl _$$SnChatCallImplFromJson(Map<String, dynamic> json) =>
_$SnChatCallImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -168,7 +172,7 @@ _SnChatCall _$SnChatCallFromJson(Map<String, dynamic> json) => _SnChatCall(
participants: json['participants'] as List<dynamic>? ?? const [], participants: json['participants'] as List<dynamic>? ?? const [],
); );
Map<String, dynamic> _$SnChatCallToJson(_SnChatCall instance) => Map<String, dynamic> _$$SnChatCallImplToJson(_$SnChatCallImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -14,7 +14,7 @@ final List<String> kCheckInResultTierSymbols = [
].map((e) => e.tr()).toList(); ].map((e) => e.tr()).toList();
@freezed @freezed
abstract class SnCheckInRecord with _$SnCheckInRecord { class SnCheckInRecord with _$SnCheckInRecord {
const SnCheckInRecord._(); const SnCheckInRecord._();
const factory SnCheckInRecord({ const factory SnCheckInRecord({

View File

@ -1,4 +1,3 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -10,81 +9,42 @@ part of 'check_in.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
SnCheckInRecord _$SnCheckInRecordFromJson(Map<String, dynamic> json) {
return _SnCheckInRecord.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$SnCheckInRecord { mixin _$SnCheckInRecord {
int get id; int get id => throw _privateConstructorUsedError;
DateTime get createdAt; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt; DateTime get updatedAt => throw _privateConstructorUsedError;
DateTime? get deletedAt; DateTime? get deletedAt => throw _privateConstructorUsedError;
int get resultTier; int get resultTier => throw _privateConstructorUsedError;
int get resultExperience; int get resultExperience => throw _privateConstructorUsedError;
double get resultCoin; double get resultCoin => throw _privateConstructorUsedError;
List<int> get resultModifiers; List<int> get resultModifiers => throw _privateConstructorUsedError;
int get accountId; int get accountId => throw _privateConstructorUsedError;
/// Serializes this SnCheckInRecord to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnCheckInRecord /// Create a copy of SnCheckInRecord
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnCheckInRecordCopyWith<SnCheckInRecord> get copyWith => $SnCheckInRecordCopyWith<SnCheckInRecord> get copyWith =>
_$SnCheckInRecordCopyWithImpl<SnCheckInRecord>( throw _privateConstructorUsedError;
this as SnCheckInRecord, _$identity);
/// Serializes this SnCheckInRecord to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnCheckInRecord &&
(identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.deletedAt, deletedAt) ||
other.deletedAt == deletedAt) &&
(identical(other.resultTier, resultTier) ||
other.resultTier == resultTier) &&
(identical(other.resultExperience, resultExperience) ||
other.resultExperience == resultExperience) &&
(identical(other.resultCoin, resultCoin) ||
other.resultCoin == resultCoin) &&
const DeepCollectionEquality()
.equals(other.resultModifiers, resultModifiers) &&
(identical(other.accountId, accountId) ||
other.accountId == accountId));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
createdAt,
updatedAt,
deletedAt,
resultTier,
resultExperience,
resultCoin,
const DeepCollectionEquality().hash(resultModifiers),
accountId);
@override
String toString() {
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnCheckInRecordCopyWith<$Res> { abstract class $SnCheckInRecordCopyWith<$Res> {
factory $SnCheckInRecordCopyWith( factory $SnCheckInRecordCopyWith(
SnCheckInRecord value, $Res Function(SnCheckInRecord) _then) = SnCheckInRecord value, $Res Function(SnCheckInRecord) then) =
_$SnCheckInRecordCopyWithImpl; _$SnCheckInRecordCopyWithImpl<$Res, SnCheckInRecord>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@ -99,12 +59,14 @@ abstract mixin class $SnCheckInRecordCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnCheckInRecordCopyWithImpl<$Res> class _$SnCheckInRecordCopyWithImpl<$Res, $Val extends SnCheckInRecord>
implements $SnCheckInRecordCopyWith<$Res> { implements $SnCheckInRecordCopyWith<$Res> {
_$SnCheckInRecordCopyWithImpl(this._self, this._then); _$SnCheckInRecordCopyWithImpl(this._value, this._then);
final SnCheckInRecord _self; // ignore: unused_field
final $Res Function(SnCheckInRecord) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnCheckInRecord /// Create a copy of SnCheckInRecord
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -121,41 +83,125 @@ class _$SnCheckInRecordCopyWithImpl<$Res>
Object? resultModifiers = null, Object? resultModifiers = null,
Object? accountId = null, Object? accountId = null,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
createdAt: null == createdAt createdAt: null == createdAt
? _self.createdAt ? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
updatedAt: null == updatedAt updatedAt: null == updatedAt
? _self.updatedAt ? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
deletedAt: freezed == deletedAt deletedAt: freezed == deletedAt
? _self.deletedAt ? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
resultTier: null == resultTier resultTier: null == resultTier
? _self.resultTier ? _value.resultTier
: resultTier // ignore: cast_nullable_to_non_nullable : resultTier // ignore: cast_nullable_to_non_nullable
as int, as int,
resultExperience: null == resultExperience resultExperience: null == resultExperience
? _self.resultExperience ? _value.resultExperience
: resultExperience // ignore: cast_nullable_to_non_nullable : resultExperience // ignore: cast_nullable_to_non_nullable
as int, as int,
resultCoin: null == resultCoin resultCoin: null == resultCoin
? _self.resultCoin ? _value.resultCoin
: resultCoin // ignore: cast_nullable_to_non_nullable : resultCoin // ignore: cast_nullable_to_non_nullable
as double, as double,
resultModifiers: null == resultModifiers resultModifiers: null == resultModifiers
? _self.resultModifiers ? _value.resultModifiers
: resultModifiers // ignore: cast_nullable_to_non_nullable : resultModifiers // ignore: cast_nullable_to_non_nullable
as List<int>, as List<int>,
accountId: null == accountId accountId: null == accountId
? _self.accountId ? _value.accountId
: accountId // ignore: cast_nullable_to_non_nullable
as int,
) as $Val);
}
}
/// @nodoc
abstract class _$$SnCheckInRecordImplCopyWith<$Res>
implements $SnCheckInRecordCopyWith<$Res> {
factory _$$SnCheckInRecordImplCopyWith(_$SnCheckInRecordImpl value,
$Res Function(_$SnCheckInRecordImpl) then) =
__$$SnCheckInRecordImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
DateTime? deletedAt,
int resultTier,
int resultExperience,
double resultCoin,
List<int> resultModifiers,
int accountId});
}
/// @nodoc
class __$$SnCheckInRecordImplCopyWithImpl<$Res>
extends _$SnCheckInRecordCopyWithImpl<$Res, _$SnCheckInRecordImpl>
implements _$$SnCheckInRecordImplCopyWith<$Res> {
__$$SnCheckInRecordImplCopyWithImpl(
_$SnCheckInRecordImpl _value, $Res Function(_$SnCheckInRecordImpl) _then)
: super(_value, _then);
/// Create a copy of SnCheckInRecord
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? resultTier = null,
Object? resultExperience = null,
Object? resultCoin = null,
Object? resultModifiers = null,
Object? accountId = null,
}) {
return _then(_$SnCheckInRecordImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
resultTier: null == resultTier
? _value.resultTier
: resultTier // ignore: cast_nullable_to_non_nullable
as int,
resultExperience: null == resultExperience
? _value.resultExperience
: resultExperience // ignore: cast_nullable_to_non_nullable
as int,
resultCoin: null == resultCoin
? _value.resultCoin
: resultCoin // ignore: cast_nullable_to_non_nullable
as double,
resultModifiers: null == resultModifiers
? _value._resultModifiers
: resultModifiers // ignore: cast_nullable_to_non_nullable
as List<int>,
accountId: null == accountId
? _value.accountId
: accountId // ignore: cast_nullable_to_non_nullable : accountId // ignore: cast_nullable_to_non_nullable
as int, as int,
)); ));
@ -164,8 +210,8 @@ class _$SnCheckInRecordCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnCheckInRecord extends SnCheckInRecord { class _$SnCheckInRecordImpl extends _SnCheckInRecord {
const _SnCheckInRecord( const _$SnCheckInRecordImpl(
{required this.id, {required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
@ -177,8 +223,9 @@ class _SnCheckInRecord extends SnCheckInRecord {
required this.accountId}) required this.accountId})
: _resultModifiers = resultModifiers, : _resultModifiers = resultModifiers,
super._(); super._();
factory _SnCheckInRecord.fromJson(Map<String, dynamic> json) =>
_$SnCheckInRecordFromJson(json); factory _$SnCheckInRecordImpl.fromJson(Map<String, dynamic> json) =>
_$$SnCheckInRecordImplFromJson(json);
@override @override
final int id; final int id;
@ -205,26 +252,16 @@ class _SnCheckInRecord extends SnCheckInRecord {
@override @override
final int accountId; final int accountId;
/// Create a copy of SnCheckInRecord
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)';
_$SnCheckInRecordCopyWith<_SnCheckInRecord> get copyWith =>
__$SnCheckInRecordCopyWithImpl<_SnCheckInRecord>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnCheckInRecordToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnCheckInRecord && other is _$SnCheckInRecordImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) || (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) && other.createdAt == createdAt) &&
@ -258,94 +295,62 @@ class _SnCheckInRecord extends SnCheckInRecord {
const DeepCollectionEquality().hash(_resultModifiers), const DeepCollectionEquality().hash(_resultModifiers),
accountId); accountId);
/// Create a copy of SnCheckInRecord
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)'; _$$SnCheckInRecordImplCopyWith<_$SnCheckInRecordImpl> get copyWith =>
} __$$SnCheckInRecordImplCopyWithImpl<_$SnCheckInRecordImpl>(
} this, _$identity);
/// @nodoc
abstract mixin class _$SnCheckInRecordCopyWith<$Res>
implements $SnCheckInRecordCopyWith<$Res> {
factory _$SnCheckInRecordCopyWith(
_SnCheckInRecord value, $Res Function(_SnCheckInRecord) _then) =
__$SnCheckInRecordCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$SnCheckInRecordImplToJson(
{int id, this,
DateTime createdAt, );
DateTime updatedAt, }
DateTime? deletedAt,
int resultTier,
int resultExperience,
double resultCoin,
List<int> resultModifiers,
int accountId});
} }
/// @nodoc abstract class _SnCheckInRecord extends SnCheckInRecord {
class __$SnCheckInRecordCopyWithImpl<$Res> const factory _SnCheckInRecord(
implements _$SnCheckInRecordCopyWith<$Res> { {required final int id,
__$SnCheckInRecordCopyWithImpl(this._self, this._then); required final DateTime createdAt,
required final DateTime updatedAt,
required final DateTime? deletedAt,
required final int resultTier,
required final int resultExperience,
required final double resultCoin,
required final List<int> resultModifiers,
required final int accountId}) = _$SnCheckInRecordImpl;
const _SnCheckInRecord._() : super._();
final _SnCheckInRecord _self; factory _SnCheckInRecord.fromJson(Map<String, dynamic> json) =
final $Res Function(_SnCheckInRecord) _then; _$SnCheckInRecordImpl.fromJson;
@override
int get id;
@override
DateTime get createdAt;
@override
DateTime get updatedAt;
@override
DateTime? get deletedAt;
@override
int get resultTier;
@override
int get resultExperience;
@override
double get resultCoin;
@override
List<int> get resultModifiers;
@override
int get accountId;
/// Create a copy of SnCheckInRecord /// Create a copy of SnCheckInRecord
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnCheckInRecordImplCopyWith<_$SnCheckInRecordImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? resultTier = null,
Object? resultExperience = null,
Object? resultCoin = null,
Object? resultModifiers = null,
Object? accountId = null,
}) {
return _then(_SnCheckInRecord(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _self.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _self.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _self.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
resultTier: null == resultTier
? _self.resultTier
: resultTier // ignore: cast_nullable_to_non_nullable
as int,
resultExperience: null == resultExperience
? _self.resultExperience
: resultExperience // ignore: cast_nullable_to_non_nullable
as int,
resultCoin: null == resultCoin
? _self.resultCoin
: resultCoin // ignore: cast_nullable_to_non_nullable
as double,
resultModifiers: null == resultModifiers
? _self._resultModifiers
: resultModifiers // ignore: cast_nullable_to_non_nullable
as List<int>,
accountId: null == accountId
? _self.accountId
: accountId // ignore: cast_nullable_to_non_nullable
as int,
));
} }
}
// dart format on

View File

@ -6,8 +6,9 @@ part of 'check_in.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnCheckInRecord _$SnCheckInRecordFromJson(Map<String, dynamic> json) => _$SnCheckInRecordImpl _$$SnCheckInRecordImplFromJson(
_SnCheckInRecord( Map<String, dynamic> json) =>
_$SnCheckInRecordImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -23,7 +24,8 @@ _SnCheckInRecord _$SnCheckInRecordFromJson(Map<String, dynamic> json) =>
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnCheckInRecordToJson(_SnCheckInRecord instance) => Map<String, dynamic> _$$SnCheckInRecordImplToJson(
_$SnCheckInRecordImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -4,7 +4,7 @@ part 'link.g.dart';
part 'link.freezed.dart'; part 'link.freezed.dart';
@freezed @freezed
abstract class SnLinkMeta with _$SnLinkMeta { class SnLinkMeta with _$SnLinkMeta {
const SnLinkMeta._(); const SnLinkMeta._();
const factory SnLinkMeta({ const factory SnLinkMeta({

View File

@ -1,4 +1,3 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -10,92 +9,47 @@ part of 'link.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
SnLinkMeta _$SnLinkMetaFromJson(Map<String, dynamic> json) {
return _SnLinkMeta.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$SnLinkMeta { mixin _$SnLinkMeta {
int get id; int get id => throw _privateConstructorUsedError;
DateTime get createdAt; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt; DateTime get updatedAt => throw _privateConstructorUsedError;
DateTime? get deletedAt; DateTime? get deletedAt => throw _privateConstructorUsedError;
String get entryId; String get entryId => throw _privateConstructorUsedError;
String? get icon; String? get icon => throw _privateConstructorUsedError;
String get url; String get url => throw _privateConstructorUsedError;
String? get title; String? get title => throw _privateConstructorUsedError;
String? get image; String? get image => throw _privateConstructorUsedError;
String? get video; String? get video => throw _privateConstructorUsedError;
String? get audio; String? get audio => throw _privateConstructorUsedError;
String? get description; String? get description => throw _privateConstructorUsedError;
String? get siteName; String? get siteName => throw _privateConstructorUsedError;
String? get type; String? get type => throw _privateConstructorUsedError;
/// Serializes this SnLinkMeta to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnLinkMeta /// Create a copy of SnLinkMeta
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnLinkMetaCopyWith<SnLinkMeta> get copyWith => $SnLinkMetaCopyWith<SnLinkMeta> get copyWith =>
_$SnLinkMetaCopyWithImpl<SnLinkMeta>(this as SnLinkMeta, _$identity); throw _privateConstructorUsedError;
/// Serializes this SnLinkMeta to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnLinkMeta &&
(identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.deletedAt, deletedAt) ||
other.deletedAt == deletedAt) &&
(identical(other.entryId, entryId) || other.entryId == entryId) &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.url, url) || other.url == url) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.video, video) || other.video == video) &&
(identical(other.audio, audio) || other.audio == audio) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.siteName, siteName) ||
other.siteName == siteName) &&
(identical(other.type, type) || other.type == type));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
createdAt,
updatedAt,
deletedAt,
entryId,
icon,
url,
title,
image,
video,
audio,
description,
siteName,
type);
@override
String toString() {
return 'SnLinkMeta(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, entryId: $entryId, icon: $icon, url: $url, title: $title, image: $image, video: $video, audio: $audio, description: $description, siteName: $siteName, type: $type)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnLinkMetaCopyWith<$Res> { abstract class $SnLinkMetaCopyWith<$Res> {
factory $SnLinkMetaCopyWith( factory $SnLinkMetaCopyWith(
SnLinkMeta value, $Res Function(SnLinkMeta) _then) = SnLinkMeta value, $Res Function(SnLinkMeta) then) =
_$SnLinkMetaCopyWithImpl; _$SnLinkMetaCopyWithImpl<$Res, SnLinkMeta>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@ -115,11 +69,14 @@ abstract mixin class $SnLinkMetaCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnLinkMetaCopyWithImpl<$Res> implements $SnLinkMetaCopyWith<$Res> { class _$SnLinkMetaCopyWithImpl<$Res, $Val extends SnLinkMeta>
_$SnLinkMetaCopyWithImpl(this._self, this._then); implements $SnLinkMetaCopyWith<$Res> {
_$SnLinkMetaCopyWithImpl(this._value, this._then);
final SnLinkMeta _self; // ignore: unused_field
final $Res Function(SnLinkMeta) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnLinkMeta /// Create a copy of SnLinkMeta
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -141,61 +98,175 @@ class _$SnLinkMetaCopyWithImpl<$Res> implements $SnLinkMetaCopyWith<$Res> {
Object? siteName = freezed, Object? siteName = freezed,
Object? type = freezed, Object? type = freezed,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
createdAt: null == createdAt createdAt: null == createdAt
? _self.createdAt ? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
updatedAt: null == updatedAt updatedAt: null == updatedAt
? _self.updatedAt ? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
deletedAt: freezed == deletedAt deletedAt: freezed == deletedAt
? _self.deletedAt ? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
entryId: null == entryId entryId: null == entryId
? _self.entryId ? _value.entryId
: entryId // ignore: cast_nullable_to_non_nullable : entryId // ignore: cast_nullable_to_non_nullable
as String, as String,
icon: freezed == icon icon: freezed == icon
? _self.icon ? _value.icon
: icon // ignore: cast_nullable_to_non_nullable : icon // ignore: cast_nullable_to_non_nullable
as String?, as String?,
url: null == url url: null == url
? _self.url ? _value.url
: url // ignore: cast_nullable_to_non_nullable : url // ignore: cast_nullable_to_non_nullable
as String, as String,
title: freezed == title title: freezed == title
? _self.title ? _value.title
: title // ignore: cast_nullable_to_non_nullable : title // ignore: cast_nullable_to_non_nullable
as String?, as String?,
image: freezed == image image: freezed == image
? _self.image ? _value.image
: image // ignore: cast_nullable_to_non_nullable : image // ignore: cast_nullable_to_non_nullable
as String?, as String?,
video: freezed == video video: freezed == video
? _self.video ? _value.video
: video // ignore: cast_nullable_to_non_nullable : video // ignore: cast_nullable_to_non_nullable
as String?, as String?,
audio: freezed == audio audio: freezed == audio
? _self.audio ? _value.audio
: audio // ignore: cast_nullable_to_non_nullable : audio // ignore: cast_nullable_to_non_nullable
as String?, as String?,
description: freezed == description description: freezed == description
? _self.description ? _value.description
: description // ignore: cast_nullable_to_non_nullable : description // ignore: cast_nullable_to_non_nullable
as String?, as String?,
siteName: freezed == siteName siteName: freezed == siteName
? _self.siteName ? _value.siteName
: siteName // ignore: cast_nullable_to_non_nullable : siteName // ignore: cast_nullable_to_non_nullable
as String?, as String?,
type: freezed == type type: freezed == type
? _self.type ? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$SnLinkMetaImplCopyWith<$Res>
implements $SnLinkMetaCopyWith<$Res> {
factory _$$SnLinkMetaImplCopyWith(
_$SnLinkMetaImpl value, $Res Function(_$SnLinkMetaImpl) then) =
__$$SnLinkMetaImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
DateTime? deletedAt,
String entryId,
String? icon,
String url,
String? title,
String? image,
String? video,
String? audio,
String? description,
String? siteName,
String? type});
}
/// @nodoc
class __$$SnLinkMetaImplCopyWithImpl<$Res>
extends _$SnLinkMetaCopyWithImpl<$Res, _$SnLinkMetaImpl>
implements _$$SnLinkMetaImplCopyWith<$Res> {
__$$SnLinkMetaImplCopyWithImpl(
_$SnLinkMetaImpl _value, $Res Function(_$SnLinkMetaImpl) _then)
: super(_value, _then);
/// Create a copy of SnLinkMeta
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? entryId = null,
Object? icon = freezed,
Object? url = null,
Object? title = freezed,
Object? image = freezed,
Object? video = freezed,
Object? audio = freezed,
Object? description = freezed,
Object? siteName = freezed,
Object? type = freezed,
}) {
return _then(_$SnLinkMetaImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
entryId: null == entryId
? _value.entryId
: entryId // ignore: cast_nullable_to_non_nullable
as String,
icon: freezed == icon
? _value.icon
: icon // ignore: cast_nullable_to_non_nullable
as String?,
url: null == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String,
title: freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
image: freezed == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String?,
video: freezed == video
? _value.video
: video // ignore: cast_nullable_to_non_nullable
as String?,
audio: freezed == audio
? _value.audio
: audio // ignore: cast_nullable_to_non_nullable
as String?,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
siteName: freezed == siteName
? _value.siteName
: siteName // ignore: cast_nullable_to_non_nullable
as String?,
type: freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable : type // ignore: cast_nullable_to_non_nullable
as String?, as String?,
)); ));
@ -204,8 +275,8 @@ class _$SnLinkMetaCopyWithImpl<$Res> implements $SnLinkMetaCopyWith<$Res> {
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnLinkMeta extends SnLinkMeta { class _$SnLinkMetaImpl extends _SnLinkMeta {
const _SnLinkMeta( const _$SnLinkMetaImpl(
{required this.id, {required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
@ -221,8 +292,9 @@ class _SnLinkMeta extends SnLinkMeta {
required this.siteName, required this.siteName,
required this.type}) required this.type})
: super._(); : super._();
factory _SnLinkMeta.fromJson(Map<String, dynamic> json) =>
_$SnLinkMetaFromJson(json); factory _$SnLinkMetaImpl.fromJson(Map<String, dynamic> json) =>
_$$SnLinkMetaImplFromJson(json);
@override @override
final int id; final int id;
@ -253,26 +325,16 @@ class _SnLinkMeta extends SnLinkMeta {
@override @override
final String? type; final String? type;
/// Create a copy of SnLinkMeta
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnLinkMeta(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, entryId: $entryId, icon: $icon, url: $url, title: $title, image: $image, video: $video, audio: $audio, description: $description, siteName: $siteName, type: $type)';
_$SnLinkMetaCopyWith<_SnLinkMeta> get copyWith =>
__$SnLinkMetaCopyWithImpl<_SnLinkMeta>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnLinkMetaToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnLinkMeta && other is _$SnLinkMetaImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) || (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) && other.createdAt == createdAt) &&
@ -313,123 +375,76 @@ class _SnLinkMeta extends SnLinkMeta {
siteName, siteName,
type); type);
/// Create a copy of SnLinkMeta
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnLinkMeta(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, entryId: $entryId, icon: $icon, url: $url, title: $title, image: $image, video: $video, audio: $audio, description: $description, siteName: $siteName, type: $type)'; _$$SnLinkMetaImplCopyWith<_$SnLinkMetaImpl> get copyWith =>
} __$$SnLinkMetaImplCopyWithImpl<_$SnLinkMetaImpl>(this, _$identity);
}
/// @nodoc
abstract mixin class _$SnLinkMetaCopyWith<$Res>
implements $SnLinkMetaCopyWith<$Res> {
factory _$SnLinkMetaCopyWith(
_SnLinkMeta value, $Res Function(_SnLinkMeta) _then) =
__$SnLinkMetaCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$SnLinkMetaImplToJson(
{int id, this,
DateTime createdAt, );
DateTime updatedAt, }
DateTime? deletedAt,
String entryId,
String? icon,
String url,
String? title,
String? image,
String? video,
String? audio,
String? description,
String? siteName,
String? type});
} }
/// @nodoc abstract class _SnLinkMeta extends SnLinkMeta {
class __$SnLinkMetaCopyWithImpl<$Res> implements _$SnLinkMetaCopyWith<$Res> { const factory _SnLinkMeta(
__$SnLinkMetaCopyWithImpl(this._self, this._then); {required final int id,
required final DateTime createdAt,
required final DateTime updatedAt,
required final DateTime? deletedAt,
required final String entryId,
required final String? icon,
required final String url,
required final String? title,
required final String? image,
required final String? video,
required final String? audio,
required final String? description,
required final String? siteName,
required final String? type}) = _$SnLinkMetaImpl;
const _SnLinkMeta._() : super._();
final _SnLinkMeta _self; factory _SnLinkMeta.fromJson(Map<String, dynamic> json) =
final $Res Function(_SnLinkMeta) _then; _$SnLinkMetaImpl.fromJson;
@override
int get id;
@override
DateTime get createdAt;
@override
DateTime get updatedAt;
@override
DateTime? get deletedAt;
@override
String get entryId;
@override
String? get icon;
@override
String get url;
@override
String? get title;
@override
String? get image;
@override
String? get video;
@override
String? get audio;
@override
String? get description;
@override
String? get siteName;
@override
String? get type;
/// Create a copy of SnLinkMeta /// Create a copy of SnLinkMeta
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnLinkMetaImplCopyWith<_$SnLinkMetaImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? entryId = null,
Object? icon = freezed,
Object? url = null,
Object? title = freezed,
Object? image = freezed,
Object? video = freezed,
Object? audio = freezed,
Object? description = freezed,
Object? siteName = freezed,
Object? type = freezed,
}) {
return _then(_SnLinkMeta(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _self.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _self.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _self.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
entryId: null == entryId
? _self.entryId
: entryId // ignore: cast_nullable_to_non_nullable
as String,
icon: freezed == icon
? _self.icon
: icon // ignore: cast_nullable_to_non_nullable
as String?,
url: null == url
? _self.url
: url // ignore: cast_nullable_to_non_nullable
as String,
title: freezed == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
image: freezed == image
? _self.image
: image // ignore: cast_nullable_to_non_nullable
as String?,
video: freezed == video
? _self.video
: video // ignore: cast_nullable_to_non_nullable
as String?,
audio: freezed == audio
? _self.audio
: audio // ignore: cast_nullable_to_non_nullable
as String?,
description: freezed == description
? _self.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
siteName: freezed == siteName
? _self.siteName
: siteName // ignore: cast_nullable_to_non_nullable
as String?,
type: freezed == type
? _self.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
));
} }
}
// dart format on

View File

@ -6,7 +6,8 @@ part of 'link.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnLinkMeta _$SnLinkMetaFromJson(Map<String, dynamic> json) => _SnLinkMeta( _$SnLinkMetaImpl _$$SnLinkMetaImplFromJson(Map<String, dynamic> json) =>
_$SnLinkMetaImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -25,7 +26,7 @@ _SnLinkMeta _$SnLinkMetaFromJson(Map<String, dynamic> json) => _SnLinkMeta(
type: json['type'] as String?, type: json['type'] as String?,
); );
Map<String, dynamic> _$SnLinkMetaToJson(_SnLinkMeta instance) => Map<String, dynamic> _$$SnLinkMetaImplToJson(_$SnLinkMetaImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -4,7 +4,7 @@ part 'news.freezed.dart';
part 'news.g.dart'; part 'news.g.dart';
@freezed @freezed
abstract class SnNewsSource with _$SnNewsSource { class SnNewsSource with _$SnNewsSource {
const factory SnNewsSource({ const factory SnNewsSource({
required String id, required String id,
required String label, required String label,
@ -18,7 +18,7 @@ abstract class SnNewsSource with _$SnNewsSource {
} }
@freezed @freezed
abstract class SnNewsArticle with _$SnNewsArticle { class SnNewsArticle with _$SnNewsArticle {
const factory SnNewsArticle({ const factory SnNewsArticle({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

View File

@ -1,4 +1,3 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -10,58 +9,39 @@ part of 'news.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
SnNewsSource _$SnNewsSourceFromJson(Map<String, dynamic> json) {
return _SnNewsSource.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$SnNewsSource { mixin _$SnNewsSource {
String get id; String get id => throw _privateConstructorUsedError;
String get label; String get label => throw _privateConstructorUsedError;
String get type; String get type => throw _privateConstructorUsedError;
String get source; String get source => throw _privateConstructorUsedError;
int get depth; int get depth => throw _privateConstructorUsedError;
bool get enabled; bool get enabled => throw _privateConstructorUsedError;
/// Serializes this SnNewsSource to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnNewsSource /// Create a copy of SnNewsSource
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnNewsSourceCopyWith<SnNewsSource> get copyWith => $SnNewsSourceCopyWith<SnNewsSource> get copyWith =>
_$SnNewsSourceCopyWithImpl<SnNewsSource>( throw _privateConstructorUsedError;
this as SnNewsSource, _$identity);
/// Serializes this SnNewsSource to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnNewsSource &&
(identical(other.id, id) || other.id == id) &&
(identical(other.label, label) || other.label == label) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.source, source) || other.source == source) &&
(identical(other.depth, depth) || other.depth == depth) &&
(identical(other.enabled, enabled) || other.enabled == enabled));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, label, type, source, depth, enabled);
@override
String toString() {
return 'SnNewsSource(id: $id, label: $label, type: $type, source: $source, depth: $depth, enabled: $enabled)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnNewsSourceCopyWith<$Res> { abstract class $SnNewsSourceCopyWith<$Res> {
factory $SnNewsSourceCopyWith( factory $SnNewsSourceCopyWith(
SnNewsSource value, $Res Function(SnNewsSource) _then) = SnNewsSource value, $Res Function(SnNewsSource) then) =
_$SnNewsSourceCopyWithImpl; _$SnNewsSourceCopyWithImpl<$Res, SnNewsSource>;
@useResult @useResult
$Res call( $Res call(
{String id, {String id,
@ -73,11 +53,14 @@ abstract mixin class $SnNewsSourceCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnNewsSourceCopyWithImpl<$Res> implements $SnNewsSourceCopyWith<$Res> { class _$SnNewsSourceCopyWithImpl<$Res, $Val extends SnNewsSource>
_$SnNewsSourceCopyWithImpl(this._self, this._then); implements $SnNewsSourceCopyWith<$Res> {
_$SnNewsSourceCopyWithImpl(this._value, this._then);
final SnNewsSource _self; // ignore: unused_field
final $Res Function(SnNewsSource) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnNewsSource /// Create a copy of SnNewsSource
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -91,29 +74,95 @@ class _$SnNewsSourceCopyWithImpl<$Res> implements $SnNewsSourceCopyWith<$Res> {
Object? depth = null, Object? depth = null,
Object? enabled = null, Object? enabled = null,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as String, as String,
label: null == label label: null == label
? _self.label ? _value.label
: label // ignore: cast_nullable_to_non_nullable : label // ignore: cast_nullable_to_non_nullable
as String, as String,
type: null == type type: null == type
? _self.type ? _value.type
: type // ignore: cast_nullable_to_non_nullable : type // ignore: cast_nullable_to_non_nullable
as String, as String,
source: null == source source: null == source
? _self.source ? _value.source
: source // ignore: cast_nullable_to_non_nullable : source // ignore: cast_nullable_to_non_nullable
as String, as String,
depth: null == depth depth: null == depth
? _self.depth ? _value.depth
: depth // ignore: cast_nullable_to_non_nullable : depth // ignore: cast_nullable_to_non_nullable
as int, as int,
enabled: null == enabled enabled: null == enabled
? _self.enabled ? _value.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
/// @nodoc
abstract class _$$SnNewsSourceImplCopyWith<$Res>
implements $SnNewsSourceCopyWith<$Res> {
factory _$$SnNewsSourceImplCopyWith(
_$SnNewsSourceImpl value, $Res Function(_$SnNewsSourceImpl) then) =
__$$SnNewsSourceImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
String label,
String type,
String source,
int depth,
bool enabled});
}
/// @nodoc
class __$$SnNewsSourceImplCopyWithImpl<$Res>
extends _$SnNewsSourceCopyWithImpl<$Res, _$SnNewsSourceImpl>
implements _$$SnNewsSourceImplCopyWith<$Res> {
__$$SnNewsSourceImplCopyWithImpl(
_$SnNewsSourceImpl _value, $Res Function(_$SnNewsSourceImpl) _then)
: super(_value, _then);
/// Create a copy of SnNewsSource
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? label = null,
Object? type = null,
Object? source = null,
Object? depth = null,
Object? enabled = null,
}) {
return _then(_$SnNewsSourceImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
label: null == label
? _value.label
: label // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
source: null == source
? _value.source
: source // ignore: cast_nullable_to_non_nullable
as String,
depth: null == depth
? _value.depth
: depth // ignore: cast_nullable_to_non_nullable
as int,
enabled: null == enabled
? _value.enabled
: enabled // ignore: cast_nullable_to_non_nullable : enabled // ignore: cast_nullable_to_non_nullable
as bool, as bool,
)); ));
@ -122,16 +171,17 @@ class _$SnNewsSourceCopyWithImpl<$Res> implements $SnNewsSourceCopyWith<$Res> {
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnNewsSource implements SnNewsSource { class _$SnNewsSourceImpl implements _SnNewsSource {
const _SnNewsSource( const _$SnNewsSourceImpl(
{required this.id, {required this.id,
required this.label, required this.label,
required this.type, required this.type,
required this.source, required this.source,
required this.depth, required this.depth,
required this.enabled}); required this.enabled});
factory _SnNewsSource.fromJson(Map<String, dynamic> json) =>
_$SnNewsSourceFromJson(json); factory _$SnNewsSourceImpl.fromJson(Map<String, dynamic> json) =>
_$$SnNewsSourceImplFromJson(json);
@override @override
final String id; final String id;
@ -146,26 +196,16 @@ class _SnNewsSource implements SnNewsSource {
@override @override
final bool enabled; final bool enabled;
/// Create a copy of SnNewsSource
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnNewsSource(id: $id, label: $label, type: $type, source: $source, depth: $depth, enabled: $enabled)';
_$SnNewsSourceCopyWith<_SnNewsSource> get copyWith =>
__$SnNewsSourceCopyWithImpl<_SnNewsSource>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnNewsSourceToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnNewsSource && other is _$SnNewsSourceImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.label, label) || other.label == label) && (identical(other.label, label) || other.label == label) &&
(identical(other.type, type) || other.type == type) && (identical(other.type, type) || other.type == type) &&
@ -179,156 +219,89 @@ class _SnNewsSource implements SnNewsSource {
int get hashCode => int get hashCode =>
Object.hash(runtimeType, id, label, type, source, depth, enabled); Object.hash(runtimeType, id, label, type, source, depth, enabled);
/// Create a copy of SnNewsSource
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnNewsSource(id: $id, label: $label, type: $type, source: $source, depth: $depth, enabled: $enabled)'; _$$SnNewsSourceImplCopyWith<_$SnNewsSourceImpl> get copyWith =>
} __$$SnNewsSourceImplCopyWithImpl<_$SnNewsSourceImpl>(this, _$identity);
}
/// @nodoc
abstract mixin class _$SnNewsSourceCopyWith<$Res>
implements $SnNewsSourceCopyWith<$Res> {
factory _$SnNewsSourceCopyWith(
_SnNewsSource value, $Res Function(_SnNewsSource) _then) =
__$SnNewsSourceCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$SnNewsSourceImplToJson(
{String id, this,
String label, );
String type, }
String source,
int depth,
bool enabled});
} }
/// @nodoc abstract class _SnNewsSource implements SnNewsSource {
class __$SnNewsSourceCopyWithImpl<$Res> const factory _SnNewsSource(
implements _$SnNewsSourceCopyWith<$Res> { {required final String id,
__$SnNewsSourceCopyWithImpl(this._self, this._then); required final String label,
required final String type,
required final String source,
required final int depth,
required final bool enabled}) = _$SnNewsSourceImpl;
final _SnNewsSource _self; factory _SnNewsSource.fromJson(Map<String, dynamic> json) =
final $Res Function(_SnNewsSource) _then; _$SnNewsSourceImpl.fromJson;
@override
String get id;
@override
String get label;
@override
String get type;
@override
String get source;
@override
int get depth;
@override
bool get enabled;
/// Create a copy of SnNewsSource /// Create a copy of SnNewsSource
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnNewsSourceImplCopyWith<_$SnNewsSourceImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? label = null,
Object? type = null,
Object? source = null,
Object? depth = null,
Object? enabled = null,
}) {
return _then(_SnNewsSource(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as String,
label: null == label
? _self.label
: label // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _self.type
: type // ignore: cast_nullable_to_non_nullable
as String,
source: null == source
? _self.source
: source // ignore: cast_nullable_to_non_nullable
as String,
depth: null == depth
? _self.depth
: depth // ignore: cast_nullable_to_non_nullable
as int,
enabled: null == enabled
? _self.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
));
} }
SnNewsArticle _$SnNewsArticleFromJson(Map<String, dynamic> json) {
return _SnNewsArticle.fromJson(json);
} }
/// @nodoc /// @nodoc
mixin _$SnNewsArticle { mixin _$SnNewsArticle {
int get id; int get id => throw _privateConstructorUsedError;
DateTime get createdAt; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt; DateTime get updatedAt => throw _privateConstructorUsedError;
dynamic get deletedAt; dynamic get deletedAt => throw _privateConstructorUsedError;
String get thumbnail; String get thumbnail => throw _privateConstructorUsedError;
String get title; String get title => throw _privateConstructorUsedError;
String get description; String get description => throw _privateConstructorUsedError;
String get content; String get content => throw _privateConstructorUsedError;
String get url; String get url => throw _privateConstructorUsedError;
String get hash; String get hash => throw _privateConstructorUsedError;
String get source; String get source => throw _privateConstructorUsedError;
DateTime? get publishedAt; DateTime? get publishedAt => throw _privateConstructorUsedError;
/// Serializes this SnNewsArticle to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnNewsArticle /// Create a copy of SnNewsArticle
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnNewsArticleCopyWith<SnNewsArticle> get copyWith => $SnNewsArticleCopyWith<SnNewsArticle> get copyWith =>
_$SnNewsArticleCopyWithImpl<SnNewsArticle>( throw _privateConstructorUsedError;
this as SnNewsArticle, _$identity);
/// Serializes this SnNewsArticle to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnNewsArticle &&
(identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
const DeepCollectionEquality().equals(other.deletedAt, deletedAt) &&
(identical(other.thumbnail, thumbnail) ||
other.thumbnail == thumbnail) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.content, content) || other.content == content) &&
(identical(other.url, url) || other.url == url) &&
(identical(other.hash, hash) || other.hash == hash) &&
(identical(other.source, source) || other.source == source) &&
(identical(other.publishedAt, publishedAt) ||
other.publishedAt == publishedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
createdAt,
updatedAt,
const DeepCollectionEquality().hash(deletedAt),
thumbnail,
title,
description,
content,
url,
hash,
source,
publishedAt);
@override
String toString() {
return 'SnNewsArticle(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, thumbnail: $thumbnail, title: $title, description: $description, content: $content, url: $url, hash: $hash, source: $source, publishedAt: $publishedAt)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnNewsArticleCopyWith<$Res> { abstract class $SnNewsArticleCopyWith<$Res> {
factory $SnNewsArticleCopyWith( factory $SnNewsArticleCopyWith(
SnNewsArticle value, $Res Function(SnNewsArticle) _then) = SnNewsArticle value, $Res Function(SnNewsArticle) then) =
_$SnNewsArticleCopyWithImpl; _$SnNewsArticleCopyWithImpl<$Res, SnNewsArticle>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@ -346,12 +319,14 @@ abstract mixin class $SnNewsArticleCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnNewsArticleCopyWithImpl<$Res> class _$SnNewsArticleCopyWithImpl<$Res, $Val extends SnNewsArticle>
implements $SnNewsArticleCopyWith<$Res> { implements $SnNewsArticleCopyWith<$Res> {
_$SnNewsArticleCopyWithImpl(this._self, this._then); _$SnNewsArticleCopyWithImpl(this._value, this._then);
final SnNewsArticle _self; // ignore: unused_field
final $Res Function(SnNewsArticle) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnNewsArticle /// Create a copy of SnNewsArticle
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -371,53 +346,155 @@ class _$SnNewsArticleCopyWithImpl<$Res>
Object? source = null, Object? source = null,
Object? publishedAt = freezed, Object? publishedAt = freezed,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
createdAt: null == createdAt createdAt: null == createdAt
? _self.createdAt ? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
updatedAt: null == updatedAt updatedAt: null == updatedAt
? _self.updatedAt ? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
deletedAt: freezed == deletedAt deletedAt: freezed == deletedAt
? _self.deletedAt ? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable : deletedAt // ignore: cast_nullable_to_non_nullable
as dynamic, as dynamic,
thumbnail: null == thumbnail thumbnail: null == thumbnail
? _self.thumbnail ? _value.thumbnail
: thumbnail // ignore: cast_nullable_to_non_nullable : thumbnail // ignore: cast_nullable_to_non_nullable
as String, as String,
title: null == title title: null == title
? _self.title ? _value.title
: title // ignore: cast_nullable_to_non_nullable : title // ignore: cast_nullable_to_non_nullable
as String, as String,
description: null == description description: null == description
? _self.description ? _value.description
: description // ignore: cast_nullable_to_non_nullable : description // ignore: cast_nullable_to_non_nullable
as String, as String,
content: null == content content: null == content
? _self.content ? _value.content
: content // ignore: cast_nullable_to_non_nullable : content // ignore: cast_nullable_to_non_nullable
as String, as String,
url: null == url url: null == url
? _self.url ? _value.url
: url // ignore: cast_nullable_to_non_nullable : url // ignore: cast_nullable_to_non_nullable
as String, as String,
hash: null == hash hash: null == hash
? _self.hash ? _value.hash
: hash // ignore: cast_nullable_to_non_nullable : hash // ignore: cast_nullable_to_non_nullable
as String, as String,
source: null == source source: null == source
? _self.source ? _value.source
: source // ignore: cast_nullable_to_non_nullable : source // ignore: cast_nullable_to_non_nullable
as String, as String,
publishedAt: freezed == publishedAt publishedAt: freezed == publishedAt
? _self.publishedAt ? _value.publishedAt
: publishedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
}
/// @nodoc
abstract class _$$SnNewsArticleImplCopyWith<$Res>
implements $SnNewsArticleCopyWith<$Res> {
factory _$$SnNewsArticleImplCopyWith(
_$SnNewsArticleImpl value, $Res Function(_$SnNewsArticleImpl) then) =
__$$SnNewsArticleImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
dynamic deletedAt,
String thumbnail,
String title,
String description,
String content,
String url,
String hash,
String source,
DateTime? publishedAt});
}
/// @nodoc
class __$$SnNewsArticleImplCopyWithImpl<$Res>
extends _$SnNewsArticleCopyWithImpl<$Res, _$SnNewsArticleImpl>
implements _$$SnNewsArticleImplCopyWith<$Res> {
__$$SnNewsArticleImplCopyWithImpl(
_$SnNewsArticleImpl _value, $Res Function(_$SnNewsArticleImpl) _then)
: super(_value, _then);
/// Create a copy of SnNewsArticle
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? thumbnail = null,
Object? title = null,
Object? description = null,
Object? content = null,
Object? url = null,
Object? hash = null,
Object? source = null,
Object? publishedAt = freezed,
}) {
return _then(_$SnNewsArticleImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as dynamic,
thumbnail: null == thumbnail
? _value.thumbnail
: thumbnail // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
content: null == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as String,
url: null == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String,
hash: null == hash
? _value.hash
: hash // ignore: cast_nullable_to_non_nullable
as String,
source: null == source
? _value.source
: source // ignore: cast_nullable_to_non_nullable
as String,
publishedAt: freezed == publishedAt
? _value.publishedAt
: publishedAt // ignore: cast_nullable_to_non_nullable : publishedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
)); ));
@ -426,8 +503,8 @@ class _$SnNewsArticleCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnNewsArticle implements SnNewsArticle { class _$SnNewsArticleImpl implements _SnNewsArticle {
const _SnNewsArticle( const _$SnNewsArticleImpl(
{required this.id, {required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
@ -440,8 +517,9 @@ class _SnNewsArticle implements SnNewsArticle {
required this.hash, required this.hash,
required this.source, required this.source,
required this.publishedAt}); required this.publishedAt});
factory _SnNewsArticle.fromJson(Map<String, dynamic> json) =>
_$SnNewsArticleFromJson(json); factory _$SnNewsArticleImpl.fromJson(Map<String, dynamic> json) =>
_$$SnNewsArticleImplFromJson(json);
@override @override
final int id; final int id;
@ -468,26 +546,16 @@ class _SnNewsArticle implements SnNewsArticle {
@override @override
final DateTime? publishedAt; final DateTime? publishedAt;
/// Create a copy of SnNewsArticle
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnNewsArticle(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, thumbnail: $thumbnail, title: $title, description: $description, content: $content, url: $url, hash: $hash, source: $source, publishedAt: $publishedAt)';
_$SnNewsArticleCopyWith<_SnNewsArticle> get copyWith =>
__$SnNewsArticleCopyWithImpl<_SnNewsArticle>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnNewsArticleToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnNewsArticle && other is _$SnNewsArticleImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) || (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) && other.createdAt == createdAt) &&
@ -524,112 +592,69 @@ class _SnNewsArticle implements SnNewsArticle {
source, source,
publishedAt); publishedAt);
/// Create a copy of SnNewsArticle
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnNewsArticle(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, thumbnail: $thumbnail, title: $title, description: $description, content: $content, url: $url, hash: $hash, source: $source, publishedAt: $publishedAt)'; _$$SnNewsArticleImplCopyWith<_$SnNewsArticleImpl> get copyWith =>
} __$$SnNewsArticleImplCopyWithImpl<_$SnNewsArticleImpl>(this, _$identity);
}
/// @nodoc
abstract mixin class _$SnNewsArticleCopyWith<$Res>
implements $SnNewsArticleCopyWith<$Res> {
factory _$SnNewsArticleCopyWith(
_SnNewsArticle value, $Res Function(_SnNewsArticle) _then) =
__$SnNewsArticleCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$SnNewsArticleImplToJson(
{int id, this,
DateTime createdAt, );
DateTime updatedAt, }
dynamic deletedAt,
String thumbnail,
String title,
String description,
String content,
String url,
String hash,
String source,
DateTime? publishedAt});
} }
/// @nodoc abstract class _SnNewsArticle implements SnNewsArticle {
class __$SnNewsArticleCopyWithImpl<$Res> const factory _SnNewsArticle(
implements _$SnNewsArticleCopyWith<$Res> { {required final int id,
__$SnNewsArticleCopyWithImpl(this._self, this._then); required final DateTime createdAt,
required final DateTime updatedAt,
required final dynamic deletedAt,
required final String thumbnail,
required final String title,
required final String description,
required final String content,
required final String url,
required final String hash,
required final String source,
required final DateTime? publishedAt}) = _$SnNewsArticleImpl;
final _SnNewsArticle _self; factory _SnNewsArticle.fromJson(Map<String, dynamic> json) =
final $Res Function(_SnNewsArticle) _then; _$SnNewsArticleImpl.fromJson;
@override
int get id;
@override
DateTime get createdAt;
@override
DateTime get updatedAt;
@override
dynamic get deletedAt;
@override
String get thumbnail;
@override
String get title;
@override
String get description;
@override
String get content;
@override
String get url;
@override
String get hash;
@override
String get source;
@override
DateTime? get publishedAt;
/// Create a copy of SnNewsArticle /// Create a copy of SnNewsArticle
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnNewsArticleImplCopyWith<_$SnNewsArticleImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? thumbnail = null,
Object? title = null,
Object? description = null,
Object? content = null,
Object? url = null,
Object? hash = null,
Object? source = null,
Object? publishedAt = freezed,
}) {
return _then(_SnNewsArticle(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _self.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _self.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _self.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as dynamic,
thumbnail: null == thumbnail
? _self.thumbnail
: thumbnail // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _self.description
: description // ignore: cast_nullable_to_non_nullable
as String,
content: null == content
? _self.content
: content // ignore: cast_nullable_to_non_nullable
as String,
url: null == url
? _self.url
: url // ignore: cast_nullable_to_non_nullable
as String,
hash: null == hash
? _self.hash
: hash // ignore: cast_nullable_to_non_nullable
as String,
source: null == source
? _self.source
: source // ignore: cast_nullable_to_non_nullable
as String,
publishedAt: freezed == publishedAt
? _self.publishedAt
: publishedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
} }
}
// dart format on

View File

@ -6,8 +6,8 @@ part of 'news.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnNewsSource _$SnNewsSourceFromJson(Map<String, dynamic> json) => _$SnNewsSourceImpl _$$SnNewsSourceImplFromJson(Map<String, dynamic> json) =>
_SnNewsSource( _$SnNewsSourceImpl(
id: json['id'] as String, id: json['id'] as String,
label: json['label'] as String, label: json['label'] as String,
type: json['type'] as String, type: json['type'] as String,
@ -16,7 +16,7 @@ _SnNewsSource _$SnNewsSourceFromJson(Map<String, dynamic> json) =>
enabled: json['enabled'] as bool, enabled: json['enabled'] as bool,
); );
Map<String, dynamic> _$SnNewsSourceToJson(_SnNewsSource instance) => Map<String, dynamic> _$$SnNewsSourceImplToJson(_$SnNewsSourceImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'label': instance.label, 'label': instance.label,
@ -26,8 +26,8 @@ Map<String, dynamic> _$SnNewsSourceToJson(_SnNewsSource instance) =>
'enabled': instance.enabled, 'enabled': instance.enabled,
}; };
_SnNewsArticle _$SnNewsArticleFromJson(Map<String, dynamic> json) => _$SnNewsArticleImpl _$$SnNewsArticleImplFromJson(Map<String, dynamic> json) =>
_SnNewsArticle( _$SnNewsArticleImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -44,7 +44,7 @@ _SnNewsArticle _$SnNewsArticleFromJson(Map<String, dynamic> json) =>
: DateTime.parse(json['published_at'] as String), : DateTime.parse(json['published_at'] as String),
); );
Map<String, dynamic> _$SnNewsArticleToJson(_SnNewsArticle instance) => Map<String, dynamic> _$$SnNewsArticleImplToJson(_$SnNewsArticleImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -4,7 +4,7 @@ part 'notification.freezed.dart';
part 'notification.g.dart'; part 'notification.g.dart';
@freezed @freezed
abstract class SnNotification with _$SnNotification { class SnNotification with _$SnNotification {
const factory SnNotification({ const factory SnNotification({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

View File

@ -1,4 +1,3 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -10,92 +9,46 @@ part of 'notification.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) {
return _SnNotification.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$SnNotification { mixin _$SnNotification {
int get id; int get id => throw _privateConstructorUsedError;
DateTime get createdAt; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt; DateTime get updatedAt => throw _privateConstructorUsedError;
DateTime? get deletedAt; DateTime? get deletedAt => throw _privateConstructorUsedError;
String get topic; String get topic => throw _privateConstructorUsedError;
String get title; String get title => throw _privateConstructorUsedError;
String? get subtitle; String? get subtitle => throw _privateConstructorUsedError;
String get body; String get body => throw _privateConstructorUsedError;
Map<String, dynamic> get metadata; Map<String, dynamic> get metadata => throw _privateConstructorUsedError;
int get priority; int get priority => throw _privateConstructorUsedError;
int? get senderId; int? get senderId => throw _privateConstructorUsedError;
int get accountId; int get accountId => throw _privateConstructorUsedError;
DateTime? get readAt; DateTime? get readAt => throw _privateConstructorUsedError;
/// Serializes this SnNotification to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnNotification /// Create a copy of SnNotification
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnNotificationCopyWith<SnNotification> get copyWith => $SnNotificationCopyWith<SnNotification> get copyWith =>
_$SnNotificationCopyWithImpl<SnNotification>( throw _privateConstructorUsedError;
this as SnNotification, _$identity);
/// Serializes this SnNotification to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnNotification &&
(identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.deletedAt, deletedAt) ||
other.deletedAt == deletedAt) &&
(identical(other.topic, topic) || other.topic == topic) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.subtitle, subtitle) ||
other.subtitle == subtitle) &&
(identical(other.body, body) || other.body == body) &&
const DeepCollectionEquality().equals(other.metadata, metadata) &&
(identical(other.priority, priority) ||
other.priority == priority) &&
(identical(other.senderId, senderId) ||
other.senderId == senderId) &&
(identical(other.accountId, accountId) ||
other.accountId == accountId) &&
(identical(other.readAt, readAt) || other.readAt == readAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
createdAt,
updatedAt,
deletedAt,
topic,
title,
subtitle,
body,
const DeepCollectionEquality().hash(metadata),
priority,
senderId,
accountId,
readAt);
@override
String toString() {
return 'SnNotification(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, topic: $topic, title: $title, subtitle: $subtitle, body: $body, metadata: $metadata, priority: $priority, senderId: $senderId, accountId: $accountId, readAt: $readAt)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnNotificationCopyWith<$Res> { abstract class $SnNotificationCopyWith<$Res> {
factory $SnNotificationCopyWith( factory $SnNotificationCopyWith(
SnNotification value, $Res Function(SnNotification) _then) = SnNotification value, $Res Function(SnNotification) then) =
_$SnNotificationCopyWithImpl; _$SnNotificationCopyWithImpl<$Res, SnNotification>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@ -114,12 +67,14 @@ abstract mixin class $SnNotificationCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnNotificationCopyWithImpl<$Res> class _$SnNotificationCopyWithImpl<$Res, $Val extends SnNotification>
implements $SnNotificationCopyWith<$Res> { implements $SnNotificationCopyWith<$Res> {
_$SnNotificationCopyWithImpl(this._self, this._then); _$SnNotificationCopyWithImpl(this._value, this._then);
final SnNotification _self; // ignore: unused_field
final $Res Function(SnNotification) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnNotification /// Create a copy of SnNotification
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -140,57 +95,165 @@ class _$SnNotificationCopyWithImpl<$Res>
Object? accountId = null, Object? accountId = null,
Object? readAt = freezed, Object? readAt = freezed,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
createdAt: null == createdAt createdAt: null == createdAt
? _self.createdAt ? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
updatedAt: null == updatedAt updatedAt: null == updatedAt
? _self.updatedAt ? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
deletedAt: freezed == deletedAt deletedAt: freezed == deletedAt
? _self.deletedAt ? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
topic: null == topic topic: null == topic
? _self.topic ? _value.topic
: topic // ignore: cast_nullable_to_non_nullable : topic // ignore: cast_nullable_to_non_nullable
as String, as String,
title: null == title title: null == title
? _self.title ? _value.title
: title // ignore: cast_nullable_to_non_nullable : title // ignore: cast_nullable_to_non_nullable
as String, as String,
subtitle: freezed == subtitle subtitle: freezed == subtitle
? _self.subtitle ? _value.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable : subtitle // ignore: cast_nullable_to_non_nullable
as String?, as String?,
body: null == body body: null == body
? _self.body ? _value.body
: body // ignore: cast_nullable_to_non_nullable : body // ignore: cast_nullable_to_non_nullable
as String, as String,
metadata: null == metadata metadata: null == metadata
? _self.metadata ? _value.metadata
: metadata // ignore: cast_nullable_to_non_nullable : metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>, as Map<String, dynamic>,
priority: null == priority priority: null == priority
? _self.priority ? _value.priority
: priority // ignore: cast_nullable_to_non_nullable : priority // ignore: cast_nullable_to_non_nullable
as int, as int,
senderId: freezed == senderId senderId: freezed == senderId
? _self.senderId ? _value.senderId
: senderId // ignore: cast_nullable_to_non_nullable : senderId // ignore: cast_nullable_to_non_nullable
as int?, as int?,
accountId: null == accountId accountId: null == accountId
? _self.accountId ? _value.accountId
: accountId // ignore: cast_nullable_to_non_nullable : accountId // ignore: cast_nullable_to_non_nullable
as int, as int,
readAt: freezed == readAt readAt: freezed == readAt
? _self.readAt ? _value.readAt
: readAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
}
/// @nodoc
abstract class _$$SnNotificationImplCopyWith<$Res>
implements $SnNotificationCopyWith<$Res> {
factory _$$SnNotificationImplCopyWith(_$SnNotificationImpl value,
$Res Function(_$SnNotificationImpl) then) =
__$$SnNotificationImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
DateTime? deletedAt,
String topic,
String title,
String? subtitle,
String body,
Map<String, dynamic> metadata,
int priority,
int? senderId,
int accountId,
DateTime? readAt});
}
/// @nodoc
class __$$SnNotificationImplCopyWithImpl<$Res>
extends _$SnNotificationCopyWithImpl<$Res, _$SnNotificationImpl>
implements _$$SnNotificationImplCopyWith<$Res> {
__$$SnNotificationImplCopyWithImpl(
_$SnNotificationImpl _value, $Res Function(_$SnNotificationImpl) _then)
: super(_value, _then);
/// Create a copy of SnNotification
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? topic = null,
Object? title = null,
Object? subtitle = freezed,
Object? body = null,
Object? metadata = null,
Object? priority = null,
Object? senderId = freezed,
Object? accountId = null,
Object? readAt = freezed,
}) {
return _then(_$SnNotificationImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
topic: null == topic
? _value.topic
: topic // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: freezed == subtitle
? _value.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String?,
body: null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
metadata: null == metadata
? _value._metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,
priority: null == priority
? _value.priority
: priority // ignore: cast_nullable_to_non_nullable
as int,
senderId: freezed == senderId
? _value.senderId
: senderId // ignore: cast_nullable_to_non_nullable
as int?,
accountId: null == accountId
? _value.accountId
: accountId // ignore: cast_nullable_to_non_nullable
as int,
readAt: freezed == readAt
? _value.readAt
: readAt // ignore: cast_nullable_to_non_nullable : readAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
)); ));
@ -199,8 +262,8 @@ class _$SnNotificationCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnNotification implements SnNotification { class _$SnNotificationImpl implements _SnNotification {
const _SnNotification( const _$SnNotificationImpl(
{required this.id, {required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
@ -215,8 +278,9 @@ class _SnNotification implements SnNotification {
required this.accountId, required this.accountId,
required this.readAt}) required this.readAt})
: _metadata = metadata; : _metadata = metadata;
factory _SnNotification.fromJson(Map<String, dynamic> json) =>
_$SnNotificationFromJson(json); factory _$SnNotificationImpl.fromJson(Map<String, dynamic> json) =>
_$$SnNotificationImplFromJson(json);
@override @override
final int id; final int id;
@ -252,26 +316,16 @@ class _SnNotification implements SnNotification {
@override @override
final DateTime? readAt; final DateTime? readAt;
/// Create a copy of SnNotification
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnNotification(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, topic: $topic, title: $title, subtitle: $subtitle, body: $body, metadata: $metadata, priority: $priority, senderId: $senderId, accountId: $accountId, readAt: $readAt)';
_$SnNotificationCopyWith<_SnNotification> get copyWith =>
__$SnNotificationCopyWithImpl<_SnNotification>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnNotificationToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnNotification && other is _$SnNotificationImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) || (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) && other.createdAt == createdAt) &&
@ -312,118 +366,73 @@ class _SnNotification implements SnNotification {
accountId, accountId,
readAt); readAt);
/// Create a copy of SnNotification
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnNotification(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, topic: $topic, title: $title, subtitle: $subtitle, body: $body, metadata: $metadata, priority: $priority, senderId: $senderId, accountId: $accountId, readAt: $readAt)'; _$$SnNotificationImplCopyWith<_$SnNotificationImpl> get copyWith =>
} __$$SnNotificationImplCopyWithImpl<_$SnNotificationImpl>(
} this, _$identity);
/// @nodoc
abstract mixin class _$SnNotificationCopyWith<$Res>
implements $SnNotificationCopyWith<$Res> {
factory _$SnNotificationCopyWith(
_SnNotification value, $Res Function(_SnNotification) _then) =
__$SnNotificationCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$SnNotificationImplToJson(
{int id, this,
DateTime createdAt, );
DateTime updatedAt, }
DateTime? deletedAt,
String topic,
String title,
String? subtitle,
String body,
Map<String, dynamic> metadata,
int priority,
int? senderId,
int accountId,
DateTime? readAt});
} }
/// @nodoc abstract class _SnNotification implements SnNotification {
class __$SnNotificationCopyWithImpl<$Res> const factory _SnNotification(
implements _$SnNotificationCopyWith<$Res> { {required final int id,
__$SnNotificationCopyWithImpl(this._self, this._then); required final DateTime createdAt,
required final DateTime updatedAt,
required final DateTime? deletedAt,
required final String topic,
required final String title,
required final String? subtitle,
required final String body,
final Map<String, dynamic> metadata,
required final int priority,
required final int? senderId,
required final int accountId,
required final DateTime? readAt}) = _$SnNotificationImpl;
final _SnNotification _self; factory _SnNotification.fromJson(Map<String, dynamic> json) =
final $Res Function(_SnNotification) _then; _$SnNotificationImpl.fromJson;
@override
int get id;
@override
DateTime get createdAt;
@override
DateTime get updatedAt;
@override
DateTime? get deletedAt;
@override
String get topic;
@override
String get title;
@override
String? get subtitle;
@override
String get body;
@override
Map<String, dynamic> get metadata;
@override
int get priority;
@override
int? get senderId;
@override
int get accountId;
@override
DateTime? get readAt;
/// Create a copy of SnNotification /// Create a copy of SnNotification
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnNotificationImplCopyWith<_$SnNotificationImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? topic = null,
Object? title = null,
Object? subtitle = freezed,
Object? body = null,
Object? metadata = null,
Object? priority = null,
Object? senderId = freezed,
Object? accountId = null,
Object? readAt = freezed,
}) {
return _then(_SnNotification(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _self.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _self.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _self.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
topic: null == topic
? _self.topic
: topic // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: freezed == subtitle
? _self.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String?,
body: null == body
? _self.body
: body // ignore: cast_nullable_to_non_nullable
as String,
metadata: null == metadata
? _self._metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,
priority: null == priority
? _self.priority
: priority // ignore: cast_nullable_to_non_nullable
as int,
senderId: freezed == senderId
? _self.senderId
: senderId // ignore: cast_nullable_to_non_nullable
as int?,
accountId: null == accountId
? _self.accountId
: accountId // ignore: cast_nullable_to_non_nullable
as int,
readAt: freezed == readAt
? _self.readAt
: readAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
} }
}
// dart format on

View File

@ -6,8 +6,8 @@ part of 'notification.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) => _$SnNotificationImpl _$$SnNotificationImplFromJson(Map<String, dynamic> json) =>
_SnNotification( _$SnNotificationImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -27,7 +27,8 @@ _SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) =>
: DateTime.parse(json['read_at'] as String), : DateTime.parse(json['read_at'] as String),
); );
Map<String, dynamic> _$SnNotificationToJson(_SnNotification instance) => Map<String, dynamic> _$$SnNotificationImplToJson(
_$SnNotificationImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -4,7 +4,7 @@ part 'poll.freezed.dart';
part 'poll.g.dart'; part 'poll.g.dart';
@freezed @freezed
abstract class SnPoll with _$SnPoll { class SnPoll with _$SnPoll {
const factory SnPoll({ const factory SnPoll({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -20,7 +20,7 @@ abstract class SnPoll with _$SnPoll {
} }
@freezed @freezed
abstract class SnPollMetric with _$SnPollMetric { class SnPollMetric with _$SnPollMetric {
const factory SnPollMetric({ const factory SnPollMetric({
required int totalAnswer, required int totalAnswer,
@Default({}) Map<String, int> byOptions, @Default({}) Map<String, int> byOptions,
@ -32,7 +32,7 @@ abstract class SnPollMetric with _$SnPollMetric {
} }
@freezed @freezed
abstract class SnPollOption with _$SnPollOption { class SnPollOption with _$SnPollOption {
const factory SnPollOption({ const factory SnPollOption({
required String id, required String id,
required String icon, required String icon,

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ part of 'poll.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnPoll _$SnPollFromJson(Map<String, dynamic> json) => _SnPoll( _$SnPollImpl _$$SnPollImplFromJson(Map<String, dynamic> json) => _$SnPollImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -19,7 +19,8 @@ _SnPoll _$SnPollFromJson(Map<String, dynamic> json) => _SnPoll(
metric: SnPollMetric.fromJson(json['metric'] as Map<String, dynamic>), metric: SnPollMetric.fromJson(json['metric'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$SnPollToJson(_SnPoll instance) => <String, dynamic>{ Map<String, dynamic> _$$SnPollImplToJson(_$SnPollImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
@ -30,8 +31,8 @@ Map<String, dynamic> _$SnPollToJson(_SnPoll instance) => <String, dynamic>{
'metric': instance.metric.toJson(), 'metric': instance.metric.toJson(),
}; };
_SnPollMetric _$SnPollMetricFromJson(Map<String, dynamic> json) => _$SnPollMetricImpl _$$SnPollMetricImplFromJson(Map<String, dynamic> json) =>
_SnPollMetric( _$SnPollMetricImpl(
totalAnswer: (json['total_answer'] as num).toInt(), totalAnswer: (json['total_answer'] as num).toInt(),
byOptions: (json['by_options'] as Map<String, dynamic>?)?.map( byOptions: (json['by_options'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, (e as num).toInt()), (k, e) => MapEntry(k, (e as num).toInt()),
@ -44,22 +45,22 @@ _SnPollMetric _$SnPollMetricFromJson(Map<String, dynamic> json) =>
const {}, const {},
); );
Map<String, dynamic> _$SnPollMetricToJson(_SnPollMetric instance) => Map<String, dynamic> _$$SnPollMetricImplToJson(_$SnPollMetricImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'total_answer': instance.totalAnswer, 'total_answer': instance.totalAnswer,
'by_options': instance.byOptions, 'by_options': instance.byOptions,
'by_options_percentage': instance.byOptionsPercentage, 'by_options_percentage': instance.byOptionsPercentage,
}; };
_SnPollOption _$SnPollOptionFromJson(Map<String, dynamic> json) => _$SnPollOptionImpl _$$SnPollOptionImplFromJson(Map<String, dynamic> json) =>
_SnPollOption( _$SnPollOptionImpl(
id: json['id'] as String, id: json['id'] as String,
icon: json['icon'] as String, icon: json['icon'] as String,
name: json['name'] as String, name: json['name'] as String,
description: json['description'] as String, description: json['description'] as String,
); );
Map<String, dynamic> _$SnPollOptionToJson(_SnPollOption instance) => Map<String, dynamic> _$$SnPollOptionImplToJson(_$SnPollOptionImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'icon': instance.icon, 'icon': instance.icon,

View File

@ -7,7 +7,7 @@ part 'post.freezed.dart';
part 'post.g.dart'; part 'post.g.dart';
@freezed @freezed
abstract class SnPost with _$SnPost { class SnPost with _$SnPost {
const SnPost._(); const SnPost._();
const factory SnPost({ const factory SnPost({
@ -57,7 +57,7 @@ abstract class SnPost with _$SnPost {
} }
@freezed @freezed
abstract class SnPostTag with _$SnPostTag { class SnPostTag with _$SnPostTag {
const factory SnPostTag({ const factory SnPostTag({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -74,7 +74,7 @@ abstract class SnPostTag with _$SnPostTag {
} }
@freezed @freezed
abstract class SnPostCategory with _$SnPostCategory { class SnPostCategory with _$SnPostCategory {
const factory SnPostCategory({ const factory SnPostCategory({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -91,7 +91,7 @@ abstract class SnPostCategory with _$SnPostCategory {
} }
@freezed @freezed
abstract class SnPostPreload with _$SnPostPreload { class SnPostPreload with _$SnPostPreload {
const factory SnPostPreload({ const factory SnPostPreload({
required SnAttachment? thumbnail, required SnAttachment? thumbnail,
required List<SnAttachment?>? attachments, required List<SnAttachment?>? attachments,
@ -105,7 +105,7 @@ abstract class SnPostPreload with _$SnPostPreload {
} }
@freezed @freezed
abstract class SnBody with _$SnBody { class SnBody with _$SnBody {
const factory SnBody({ const factory SnBody({
required List<String> attachments, required List<String> attachments,
required String content, required String content,
@ -118,7 +118,7 @@ abstract class SnBody with _$SnBody {
} }
@freezed @freezed
abstract class SnMetric with _$SnMetric { class SnMetric with _$SnMetric {
const factory SnMetric({ const factory SnMetric({
required int replyCount, required int replyCount,
required int reactionCount, required int reactionCount,
@ -130,7 +130,7 @@ abstract class SnMetric with _$SnMetric {
} }
@freezed @freezed
abstract class SnPublisher with _$SnPublisher { class SnPublisher with _$SnPublisher {
const factory SnPublisher({ const factory SnPublisher({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -153,7 +153,7 @@ abstract class SnPublisher with _$SnPublisher {
} }
@freezed @freezed
abstract class SnSubscription with _$SnSubscription { class SnSubscription with _$SnSubscription {
const factory SnSubscription({ const factory SnSubscription({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ part of 'post.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost( _$SnPostImpl _$$SnPostImplFromJson(Map<String, dynamic> json) => _$SnPostImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -76,7 +76,8 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
: SnPostPreload.fromJson(json['preload'] as Map<String, dynamic>), : SnPostPreload.fromJson(json['preload'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$SnPostToJson(_SnPost instance) => <String, dynamic>{ Map<String, dynamic> _$$SnPostImplToJson(_$SnPostImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
@ -114,7 +115,8 @@ Map<String, dynamic> _$SnPostToJson(_SnPost instance) => <String, dynamic>{
'preload': instance.preload?.toJson(), 'preload': instance.preload?.toJson(),
}; };
_SnPostTag _$SnPostTagFromJson(Map<String, dynamic> json) => _SnPostTag( _$SnPostTagImpl _$$SnPostTagImplFromJson(Map<String, dynamic> json) =>
_$SnPostTagImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -125,7 +127,7 @@ _SnPostTag _$SnPostTagFromJson(Map<String, dynamic> json) => _SnPostTag(
posts: json['posts'], posts: json['posts'],
); );
Map<String, dynamic> _$SnPostTagToJson(_SnPostTag instance) => Map<String, dynamic> _$$SnPostTagImplToJson(_$SnPostTagImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -137,8 +139,8 @@ Map<String, dynamic> _$SnPostTagToJson(_SnPostTag instance) =>
'posts': instance.posts, 'posts': instance.posts,
}; };
_SnPostCategory _$SnPostCategoryFromJson(Map<String, dynamic> json) => _$SnPostCategoryImpl _$$SnPostCategoryImplFromJson(Map<String, dynamic> json) =>
_SnPostCategory( _$SnPostCategoryImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -149,7 +151,8 @@ _SnPostCategory _$SnPostCategoryFromJson(Map<String, dynamic> json) =>
posts: json['posts'], posts: json['posts'],
); );
Map<String, dynamic> _$SnPostCategoryToJson(_SnPostCategory instance) => Map<String, dynamic> _$$SnPostCategoryImplToJson(
_$SnPostCategoryImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -161,8 +164,8 @@ Map<String, dynamic> _$SnPostCategoryToJson(_SnPostCategory instance) =>
'posts': instance.posts, 'posts': instance.posts,
}; };
_SnPostPreload _$SnPostPreloadFromJson(Map<String, dynamic> json) => _$SnPostPreloadImpl _$$SnPostPreloadImplFromJson(Map<String, dynamic> json) =>
_SnPostPreload( _$SnPostPreloadImpl(
thumbnail: json['thumbnail'] == null thumbnail: json['thumbnail'] == null
? null ? null
: SnAttachment.fromJson(json['thumbnail'] as Map<String, dynamic>), : SnAttachment.fromJson(json['thumbnail'] as Map<String, dynamic>),
@ -182,7 +185,7 @@ _SnPostPreload _$SnPostPreloadFromJson(Map<String, dynamic> json) =>
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>), : SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$SnPostPreloadToJson(_SnPostPreload instance) => Map<String, dynamic> _$$SnPostPreloadImplToJson(_$SnPostPreloadImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'thumbnail': instance.thumbnail?.toJson(), 'thumbnail': instance.thumbnail?.toJson(),
'attachments': instance.attachments?.map((e) => e?.toJson()).toList(), 'attachments': instance.attachments?.map((e) => e?.toJson()).toList(),
@ -191,7 +194,7 @@ Map<String, dynamic> _$SnPostPreloadToJson(_SnPostPreload instance) =>
'realm': instance.realm?.toJson(), 'realm': instance.realm?.toJson(),
}; };
_SnBody _$SnBodyFromJson(Map<String, dynamic> json) => _SnBody( _$SnBodyImpl _$$SnBodyImplFromJson(Map<String, dynamic> json) => _$SnBodyImpl(
attachments: (json['attachments'] as List<dynamic>) attachments: (json['attachments'] as List<dynamic>)
.map((e) => e as String) .map((e) => e as String)
.toList(), .toList(),
@ -201,7 +204,8 @@ _SnBody _$SnBodyFromJson(Map<String, dynamic> json) => _SnBody(
title: json['title'], title: json['title'],
); );
Map<String, dynamic> _$SnBodyToJson(_SnBody instance) => <String, dynamic>{ Map<String, dynamic> _$$SnBodyImplToJson(_$SnBodyImpl instance) =>
<String, dynamic>{
'attachments': instance.attachments, 'attachments': instance.attachments,
'content': instance.content, 'content': instance.content,
'location': instance.location, 'location': instance.location,
@ -209,7 +213,8 @@ Map<String, dynamic> _$SnBodyToJson(_SnBody instance) => <String, dynamic>{
'title': instance.title, 'title': instance.title,
}; };
_SnMetric _$SnMetricFromJson(Map<String, dynamic> json) => _SnMetric( _$SnMetricImpl _$$SnMetricImplFromJson(Map<String, dynamic> json) =>
_$SnMetricImpl(
replyCount: (json['reply_count'] as num).toInt(), replyCount: (json['reply_count'] as num).toInt(),
reactionCount: (json['reaction_count'] as num).toInt(), reactionCount: (json['reaction_count'] as num).toInt(),
reactionList: (json['reaction_list'] as Map<String, dynamic>?)?.map( reactionList: (json['reaction_list'] as Map<String, dynamic>?)?.map(
@ -218,13 +223,15 @@ _SnMetric _$SnMetricFromJson(Map<String, dynamic> json) => _SnMetric(
const {}, const {},
); );
Map<String, dynamic> _$SnMetricToJson(_SnMetric instance) => <String, dynamic>{ Map<String, dynamic> _$$SnMetricImplToJson(_$SnMetricImpl instance) =>
<String, dynamic>{
'reply_count': instance.replyCount, 'reply_count': instance.replyCount,
'reaction_count': instance.reactionCount, 'reaction_count': instance.reactionCount,
'reaction_list': instance.reactionList, 'reaction_list': instance.reactionList,
}; };
_SnPublisher _$SnPublisherFromJson(Map<String, dynamic> json) => _SnPublisher( _$SnPublisherImpl _$$SnPublisherImplFromJson(Map<String, dynamic> json) =>
_$SnPublisherImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -243,7 +250,7 @@ _SnPublisher _$SnPublisherFromJson(Map<String, dynamic> json) => _SnPublisher(
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) => Map<String, dynamic> _$$SnPublisherImplToJson(_$SnPublisherImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -261,8 +268,8 @@ Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
'account_id': instance.accountId, 'account_id': instance.accountId,
}; };
_SnSubscription _$SnSubscriptionFromJson(Map<String, dynamic> json) => _$SnSubscriptionImpl _$$SnSubscriptionImplFromJson(Map<String, dynamic> json) =>
_SnSubscription( _$SnSubscriptionImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -273,7 +280,8 @@ _SnSubscription _$SnSubscriptionFromJson(Map<String, dynamic> json) =>
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnSubscriptionToJson(_SnSubscription instance) => Map<String, dynamic> _$$SnSubscriptionImplToJson(
_$SnSubscriptionImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -5,7 +5,7 @@ part 'realm.freezed.dart';
part 'realm.g.dart'; part 'realm.g.dart';
@freezed @freezed
abstract class SnRealmMember with _$SnRealmMember { class SnRealmMember with _$SnRealmMember {
const factory SnRealmMember({ const factory SnRealmMember({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -23,7 +23,7 @@ abstract class SnRealmMember with _$SnRealmMember {
} }
@freezed @freezed
abstract class SnRealm with _$SnRealm { class SnRealm with _$SnRealm {
const SnRealm._(); const SnRealm._();
const factory SnRealm({ const factory SnRealm({

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@ part of 'realm.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnRealmMember _$SnRealmMemberFromJson(Map<String, dynamic> json) => _$SnRealmMemberImpl _$$SnRealmMemberImplFromJson(Map<String, dynamic> json) =>
_SnRealmMember( _$SnRealmMemberImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -21,7 +21,7 @@ _SnRealmMember _$SnRealmMemberFromJson(Map<String, dynamic> json) =>
powerLevel: (json['power_level'] as num).toInt(), powerLevel: (json['power_level'] as num).toInt(),
); );
Map<String, dynamic> _$SnRealmMemberToJson(_SnRealmMember instance) => Map<String, dynamic> _$$SnRealmMemberImplToJson(_$SnRealmMemberImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
@ -34,7 +34,8 @@ Map<String, dynamic> _$SnRealmMemberToJson(_SnRealmMember instance) =>
'power_level': instance.powerLevel, 'power_level': instance.powerLevel,
}; };
_SnRealm _$SnRealmFromJson(Map<String, dynamic> json) => _SnRealm( _$SnRealmImpl _$$SnRealmImplFromJson(Map<String, dynamic> json) =>
_$SnRealmImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -56,7 +57,8 @@ _SnRealm _$SnRealmFromJson(Map<String, dynamic> json) => _SnRealm(
popularity: (json['popularity'] as num?)?.toInt() ?? 0, popularity: (json['popularity'] as num?)?.toInt() ?? 0,
); );
Map<String, dynamic> _$SnRealmToJson(_SnRealm instance) => <String, dynamic>{ Map<String, dynamic> _$$SnRealmImplToJson(_$SnRealmImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),

View File

@ -4,7 +4,7 @@ part 'wallet.freezed.dart';
part 'wallet.g.dart'; part 'wallet.g.dart';
@freezed @freezed
abstract class SnWallet with _$SnWallet { class SnWallet with _$SnWallet {
const factory SnWallet({ const factory SnWallet({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,
@ -19,7 +19,7 @@ abstract class SnWallet with _$SnWallet {
} }
@freezed @freezed
abstract class SnTransaction with _$SnTransaction { class SnTransaction with _$SnTransaction {
const factory SnTransaction({ const factory SnTransaction({
required int id, required int id,
required DateTime createdAt, required DateTime createdAt,

View File

@ -1,4 +1,3 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -10,63 +9,39 @@ part of 'wallet.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
SnWallet _$SnWalletFromJson(Map<String, dynamic> json) {
return _SnWallet.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$SnWallet { mixin _$SnWallet {
int get id; int get id => throw _privateConstructorUsedError;
DateTime get createdAt; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt; DateTime get updatedAt => throw _privateConstructorUsedError;
DateTime? get deletedAt; DateTime? get deletedAt => throw _privateConstructorUsedError;
String get balance; String get balance => throw _privateConstructorUsedError;
String get password; String get password => throw _privateConstructorUsedError;
int get accountId; int get accountId => throw _privateConstructorUsedError;
/// Serializes this SnWallet to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnWallet /// Create a copy of SnWallet
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnWalletCopyWith<SnWallet> get copyWith => $SnWalletCopyWith<SnWallet> get copyWith =>
_$SnWalletCopyWithImpl<SnWallet>(this as SnWallet, _$identity); throw _privateConstructorUsedError;
/// Serializes this SnWallet to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnWallet &&
(identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.deletedAt, deletedAt) ||
other.deletedAt == deletedAt) &&
(identical(other.balance, balance) || other.balance == balance) &&
(identical(other.password, password) ||
other.password == password) &&
(identical(other.accountId, accountId) ||
other.accountId == accountId));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt,
deletedAt, balance, password, accountId);
@override
String toString() {
return 'SnWallet(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, balance: $balance, password: $password, accountId: $accountId)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnWalletCopyWith<$Res> { abstract class $SnWalletCopyWith<$Res> {
factory $SnWalletCopyWith(SnWallet value, $Res Function(SnWallet) _then) = factory $SnWalletCopyWith(SnWallet value, $Res Function(SnWallet) then) =
_$SnWalletCopyWithImpl; _$SnWalletCopyWithImpl<$Res, SnWallet>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@ -79,11 +54,14 @@ abstract mixin class $SnWalletCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnWalletCopyWithImpl<$Res> implements $SnWalletCopyWith<$Res> { class _$SnWalletCopyWithImpl<$Res, $Val extends SnWallet>
_$SnWalletCopyWithImpl(this._self, this._then); implements $SnWalletCopyWith<$Res> {
_$SnWalletCopyWithImpl(this._value, this._then);
final SnWallet _self; // ignore: unused_field
final $Res Function(SnWallet) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnWallet /// Create a copy of SnWallet
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -98,33 +76,105 @@ class _$SnWalletCopyWithImpl<$Res> implements $SnWalletCopyWith<$Res> {
Object? password = null, Object? password = null,
Object? accountId = null, Object? accountId = null,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
createdAt: null == createdAt createdAt: null == createdAt
? _self.createdAt ? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
updatedAt: null == updatedAt updatedAt: null == updatedAt
? _self.updatedAt ? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
deletedAt: freezed == deletedAt deletedAt: freezed == deletedAt
? _self.deletedAt ? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
balance: null == balance balance: null == balance
? _self.balance ? _value.balance
: balance // ignore: cast_nullable_to_non_nullable : balance // ignore: cast_nullable_to_non_nullable
as String, as String,
password: null == password password: null == password
? _self.password ? _value.password
: password // ignore: cast_nullable_to_non_nullable : password // ignore: cast_nullable_to_non_nullable
as String, as String,
accountId: null == accountId accountId: null == accountId
? _self.accountId ? _value.accountId
: accountId // ignore: cast_nullable_to_non_nullable
as int,
) as $Val);
}
}
/// @nodoc
abstract class _$$SnWalletImplCopyWith<$Res>
implements $SnWalletCopyWith<$Res> {
factory _$$SnWalletImplCopyWith(
_$SnWalletImpl value, $Res Function(_$SnWalletImpl) then) =
__$$SnWalletImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
DateTime? deletedAt,
String balance,
String password,
int accountId});
}
/// @nodoc
class __$$SnWalletImplCopyWithImpl<$Res>
extends _$SnWalletCopyWithImpl<$Res, _$SnWalletImpl>
implements _$$SnWalletImplCopyWith<$Res> {
__$$SnWalletImplCopyWithImpl(
_$SnWalletImpl _value, $Res Function(_$SnWalletImpl) _then)
: super(_value, _then);
/// Create a copy of SnWallet
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? balance = null,
Object? password = null,
Object? accountId = null,
}) {
return _then(_$SnWalletImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
balance: null == balance
? _value.balance
: balance // ignore: cast_nullable_to_non_nullable
as String,
password: null == password
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as String,
accountId: null == accountId
? _value.accountId
: accountId // ignore: cast_nullable_to_non_nullable : accountId // ignore: cast_nullable_to_non_nullable
as int, as int,
)); ));
@ -133,8 +183,8 @@ class _$SnWalletCopyWithImpl<$Res> implements $SnWalletCopyWith<$Res> {
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnWallet implements SnWallet { class _$SnWalletImpl implements _SnWallet {
const _SnWallet( const _$SnWalletImpl(
{required this.id, {required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
@ -142,8 +192,9 @@ class _SnWallet implements SnWallet {
required this.balance, required this.balance,
required this.password, required this.password,
required this.accountId}); required this.accountId});
factory _SnWallet.fromJson(Map<String, dynamic> json) =>
_$SnWalletFromJson(json); factory _$SnWalletImpl.fromJson(Map<String, dynamic> json) =>
_$$SnWalletImplFromJson(json);
@override @override
final int id; final int id;
@ -160,26 +211,16 @@ class _SnWallet implements SnWallet {
@override @override
final int accountId; final int accountId;
/// Create a copy of SnWallet
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnWallet(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, balance: $balance, password: $password, accountId: $accountId)';
_$SnWalletCopyWith<_SnWallet> get copyWith =>
__$SnWalletCopyWithImpl<_SnWallet>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnWalletToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnWallet && other is _$SnWalletImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) || (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) && other.createdAt == createdAt) &&
@ -199,142 +240,90 @@ class _SnWallet implements SnWallet {
int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt,
deletedAt, balance, password, accountId); deletedAt, balance, password, accountId);
/// Create a copy of SnWallet
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnWallet(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, balance: $balance, password: $password, accountId: $accountId)'; _$$SnWalletImplCopyWith<_$SnWalletImpl> get copyWith =>
} __$$SnWalletImplCopyWithImpl<_$SnWalletImpl>(this, _$identity);
}
/// @nodoc
abstract mixin class _$SnWalletCopyWith<$Res>
implements $SnWalletCopyWith<$Res> {
factory _$SnWalletCopyWith(_SnWallet value, $Res Function(_SnWallet) _then) =
__$SnWalletCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$SnWalletImplToJson(
{int id, this,
DateTime createdAt, );
DateTime updatedAt, }
DateTime? deletedAt,
String balance,
String password,
int accountId});
} }
/// @nodoc abstract class _SnWallet implements SnWallet {
class __$SnWalletCopyWithImpl<$Res> implements _$SnWalletCopyWith<$Res> { const factory _SnWallet(
__$SnWalletCopyWithImpl(this._self, this._then); {required final int id,
required final DateTime createdAt,
required final DateTime updatedAt,
required final DateTime? deletedAt,
required final String balance,
required final String password,
required final int accountId}) = _$SnWalletImpl;
final _SnWallet _self; factory _SnWallet.fromJson(Map<String, dynamic> json) =
final $Res Function(_SnWallet) _then; _$SnWalletImpl.fromJson;
@override
int get id;
@override
DateTime get createdAt;
@override
DateTime get updatedAt;
@override
DateTime? get deletedAt;
@override
String get balance;
@override
String get password;
@override
int get accountId;
/// Create a copy of SnWallet /// Create a copy of SnWallet
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnWalletImplCopyWith<_$SnWalletImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? balance = null,
Object? password = null,
Object? accountId = null,
}) {
return _then(_SnWallet(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _self.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _self.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _self.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
balance: null == balance
? _self.balance
: balance // ignore: cast_nullable_to_non_nullable
as String,
password: null == password
? _self.password
: password // ignore: cast_nullable_to_non_nullable
as String,
accountId: null == accountId
? _self.accountId
: accountId // ignore: cast_nullable_to_non_nullable
as int,
));
} }
SnTransaction _$SnTransactionFromJson(Map<String, dynamic> json) {
return _SnTransaction.fromJson(json);
} }
/// @nodoc /// @nodoc
mixin _$SnTransaction { mixin _$SnTransaction {
int get id; int get id => throw _privateConstructorUsedError;
DateTime get createdAt; DateTime get createdAt => throw _privateConstructorUsedError;
DateTime get updatedAt; DateTime get updatedAt => throw _privateConstructorUsedError;
DateTime? get deletedAt; DateTime? get deletedAt => throw _privateConstructorUsedError;
String get remark; String get remark => throw _privateConstructorUsedError;
String get amount; String get amount => throw _privateConstructorUsedError;
SnWallet? get payer; SnWallet? get payer => throw _privateConstructorUsedError;
SnWallet? get payee; SnWallet? get payee => throw _privateConstructorUsedError;
int? get payerId; int? get payerId => throw _privateConstructorUsedError;
int? get payeeId; int? get payeeId => throw _privateConstructorUsedError;
/// Serializes this SnTransaction to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnTransaction /// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnTransactionCopyWith<SnTransaction> get copyWith => $SnTransactionCopyWith<SnTransaction> get copyWith =>
_$SnTransactionCopyWithImpl<SnTransaction>( throw _privateConstructorUsedError;
this as SnTransaction, _$identity);
/// Serializes this SnTransaction to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is SnTransaction &&
(identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.deletedAt, deletedAt) ||
other.deletedAt == deletedAt) &&
(identical(other.remark, remark) || other.remark == remark) &&
(identical(other.amount, amount) || other.amount == amount) &&
(identical(other.payer, payer) || other.payer == payer) &&
(identical(other.payee, payee) || other.payee == payee) &&
(identical(other.payerId, payerId) || other.payerId == payerId) &&
(identical(other.payeeId, payeeId) || other.payeeId == payeeId));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt,
deletedAt, remark, amount, payer, payee, payerId, payeeId);
@override
String toString() {
return 'SnTransaction(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, remark: $remark, amount: $amount, payer: $payer, payee: $payee, payerId: $payerId, payeeId: $payeeId)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $SnTransactionCopyWith<$Res> { abstract class $SnTransactionCopyWith<$Res> {
factory $SnTransactionCopyWith( factory $SnTransactionCopyWith(
SnTransaction value, $Res Function(SnTransaction) _then) = SnTransaction value, $Res Function(SnTransaction) then) =
_$SnTransactionCopyWithImpl; _$SnTransactionCopyWithImpl<$Res, SnTransaction>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@ -353,12 +342,14 @@ abstract mixin class $SnTransactionCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SnTransactionCopyWithImpl<$Res> class _$SnTransactionCopyWithImpl<$Res, $Val extends SnTransaction>
implements $SnTransactionCopyWith<$Res> { implements $SnTransactionCopyWith<$Res> {
_$SnTransactionCopyWithImpl(this._self, this._then); _$SnTransactionCopyWithImpl(this._value, this._then);
final SnTransaction _self; // ignore: unused_field
final $Res Function(SnTransaction) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnTransaction /// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -376,48 +367,48 @@ class _$SnTransactionCopyWithImpl<$Res>
Object? payerId = freezed, Object? payerId = freezed,
Object? payeeId = freezed, Object? payeeId = freezed,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
? _self.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
createdAt: null == createdAt createdAt: null == createdAt
? _self.createdAt ? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
updatedAt: null == updatedAt updatedAt: null == updatedAt
? _self.updatedAt ? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime, as DateTime,
deletedAt: freezed == deletedAt deletedAt: freezed == deletedAt
? _self.deletedAt ? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
remark: null == remark remark: null == remark
? _self.remark ? _value.remark
: remark // ignore: cast_nullable_to_non_nullable : remark // ignore: cast_nullable_to_non_nullable
as String, as String,
amount: null == amount amount: null == amount
? _self.amount ? _value.amount
: amount // ignore: cast_nullable_to_non_nullable : amount // ignore: cast_nullable_to_non_nullable
as String, as String,
payer: freezed == payer payer: freezed == payer
? _self.payer ? _value.payer
: payer // ignore: cast_nullable_to_non_nullable : payer // ignore: cast_nullable_to_non_nullable
as SnWallet?, as SnWallet?,
payee: freezed == payee payee: freezed == payee
? _self.payee ? _value.payee
: payee // ignore: cast_nullable_to_non_nullable : payee // ignore: cast_nullable_to_non_nullable
as SnWallet?, as SnWallet?,
payerId: freezed == payerId payerId: freezed == payerId
? _self.payerId ? _value.payerId
: payerId // ignore: cast_nullable_to_non_nullable : payerId // ignore: cast_nullable_to_non_nullable
as int?, as int?,
payeeId: freezed == payeeId payeeId: freezed == payeeId
? _self.payeeId ? _value.payeeId
: payeeId // ignore: cast_nullable_to_non_nullable : payeeId // ignore: cast_nullable_to_non_nullable
as int?, as int?,
)); ) as $Val);
} }
/// Create a copy of SnTransaction /// Create a copy of SnTransaction
@ -425,12 +416,12 @@ class _$SnTransactionCopyWithImpl<$Res>
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$SnWalletCopyWith<$Res>? get payer { $SnWalletCopyWith<$Res>? get payer {
if (_self.payer == null) { if (_value.payer == null) {
return null; return null;
} }
return $SnWalletCopyWith<$Res>(_self.payer!, (value) { return $SnWalletCopyWith<$Res>(_value.payer!, (value) {
return _then(_self.copyWith(payer: value)); return _then(_value.copyWith(payer: value) as $Val);
}); });
} }
@ -439,20 +430,115 @@ class _$SnTransactionCopyWithImpl<$Res>
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$SnWalletCopyWith<$Res>? get payee { $SnWalletCopyWith<$Res>? get payee {
if (_self.payee == null) { if (_value.payee == null) {
return null; return null;
} }
return $SnWalletCopyWith<$Res>(_self.payee!, (value) { return $SnWalletCopyWith<$Res>(_value.payee!, (value) {
return _then(_self.copyWith(payee: value)); return _then(_value.copyWith(payee: value) as $Val);
}); });
} }
} }
/// @nodoc
abstract class _$$SnTransactionImplCopyWith<$Res>
implements $SnTransactionCopyWith<$Res> {
factory _$$SnTransactionImplCopyWith(
_$SnTransactionImpl value, $Res Function(_$SnTransactionImpl) then) =
__$$SnTransactionImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
DateTime? deletedAt,
String remark,
String amount,
SnWallet? payer,
SnWallet? payee,
int? payerId,
int? payeeId});
@override
$SnWalletCopyWith<$Res>? get payer;
@override
$SnWalletCopyWith<$Res>? get payee;
}
/// @nodoc
class __$$SnTransactionImplCopyWithImpl<$Res>
extends _$SnTransactionCopyWithImpl<$Res, _$SnTransactionImpl>
implements _$$SnTransactionImplCopyWith<$Res> {
__$$SnTransactionImplCopyWithImpl(
_$SnTransactionImpl _value, $Res Function(_$SnTransactionImpl) _then)
: super(_value, _then);
/// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? remark = null,
Object? amount = null,
Object? payer = freezed,
Object? payee = freezed,
Object? payerId = freezed,
Object? payeeId = freezed,
}) {
return _then(_$SnTransactionImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _value.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
remark: null == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String,
amount: null == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
as String,
payer: freezed == payer
? _value.payer
: payer // ignore: cast_nullable_to_non_nullable
as SnWallet?,
payee: freezed == payee
? _value.payee
: payee // ignore: cast_nullable_to_non_nullable
as SnWallet?,
payerId: freezed == payerId
? _value.payerId
: payerId // ignore: cast_nullable_to_non_nullable
as int?,
payeeId: freezed == payeeId
? _value.payeeId
: payeeId // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _SnTransaction implements SnTransaction { class _$SnTransactionImpl implements _SnTransaction {
const _SnTransaction( const _$SnTransactionImpl(
{required this.id, {required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
@ -463,8 +549,9 @@ class _SnTransaction implements SnTransaction {
required this.payee, required this.payee,
required this.payerId, required this.payerId,
required this.payeeId}); required this.payeeId});
factory _SnTransaction.fromJson(Map<String, dynamic> json) =>
_$SnTransactionFromJson(json); factory _$SnTransactionImpl.fromJson(Map<String, dynamic> json) =>
_$$SnTransactionImplFromJson(json);
@override @override
final int id; final int id;
@ -487,26 +574,16 @@ class _SnTransaction implements SnTransaction {
@override @override
final int? payeeId; final int? payeeId;
/// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'SnTransaction(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, remark: $remark, amount: $amount, payer: $payer, payee: $payee, payerId: $payerId, payeeId: $payeeId)';
_$SnTransactionCopyWith<_SnTransaction> get copyWith =>
__$SnTransactionCopyWithImpl<_SnTransaction>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnTransactionToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _SnTransaction && other is _$SnTransactionImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.createdAt, createdAt) || (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) && other.createdAt == createdAt) &&
@ -527,133 +604,63 @@ class _SnTransaction implements SnTransaction {
int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt,
deletedAt, remark, amount, payer, payee, payerId, payeeId); deletedAt, remark, amount, payer, payee, payerId, payeeId);
/// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'SnTransaction(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, remark: $remark, amount: $amount, payer: $payer, payee: $payee, payerId: $payerId, payeeId: $payeeId)'; _$$SnTransactionImplCopyWith<_$SnTransactionImpl> get copyWith =>
__$$SnTransactionImplCopyWithImpl<_$SnTransactionImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$SnTransactionImplToJson(
this,
);
} }
} }
/// @nodoc abstract class _SnTransaction implements SnTransaction {
abstract mixin class _$SnTransactionCopyWith<$Res> const factory _SnTransaction(
implements $SnTransactionCopyWith<$Res> { {required final int id,
factory _$SnTransactionCopyWith( required final DateTime createdAt,
_SnTransaction value, $Res Function(_SnTransaction) _then) = required final DateTime updatedAt,
__$SnTransactionCopyWithImpl; required final DateTime? deletedAt,
@override required final String remark,
@useResult required final String amount,
$Res call( required final SnWallet? payer,
{int id, required final SnWallet? payee,
DateTime createdAt, required final int? payerId,
DateTime updatedAt, required final int? payeeId}) = _$SnTransactionImpl;
DateTime? deletedAt,
String remark, factory _SnTransaction.fromJson(Map<String, dynamic> json) =
String amount, _$SnTransactionImpl.fromJson;
SnWallet? payer,
SnWallet? payee,
int? payerId,
int? payeeId});
@override @override
$SnWalletCopyWith<$Res>? get payer; int get id;
@override @override
$SnWalletCopyWith<$Res>? get payee; DateTime get createdAt;
} @override
DateTime get updatedAt;
/// @nodoc @override
class __$SnTransactionCopyWithImpl<$Res> DateTime? get deletedAt;
implements _$SnTransactionCopyWith<$Res> { @override
__$SnTransactionCopyWithImpl(this._self, this._then); String get remark;
@override
final _SnTransaction _self; String get amount;
final $Res Function(_SnTransaction) _then; @override
SnWallet? get payer;
@override
SnWallet? get payee;
@override
int? get payerId;
@override
int? get payeeId;
/// Create a copy of SnTransaction /// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$SnTransactionImplCopyWith<_$SnTransactionImpl> get copyWith =>
Object? id = null, throw _privateConstructorUsedError;
Object? createdAt = null,
Object? updatedAt = null,
Object? deletedAt = freezed,
Object? remark = null,
Object? amount = null,
Object? payer = freezed,
Object? payee = freezed,
Object? payerId = freezed,
Object? payeeId = freezed,
}) {
return _then(_SnTransaction(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _self.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _self.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
deletedAt: freezed == deletedAt
? _self.deletedAt
: deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
remark: null == remark
? _self.remark
: remark // ignore: cast_nullable_to_non_nullable
as String,
amount: null == amount
? _self.amount
: amount // ignore: cast_nullable_to_non_nullable
as String,
payer: freezed == payer
? _self.payer
: payer // ignore: cast_nullable_to_non_nullable
as SnWallet?,
payee: freezed == payee
? _self.payee
: payee // ignore: cast_nullable_to_non_nullable
as SnWallet?,
payerId: freezed == payerId
? _self.payerId
: payerId // ignore: cast_nullable_to_non_nullable
as int?,
payeeId: freezed == payeeId
? _self.payeeId
: payeeId // ignore: cast_nullable_to_non_nullable
as int?,
));
} }
/// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnWalletCopyWith<$Res>? get payer {
if (_self.payer == null) {
return null;
}
return $SnWalletCopyWith<$Res>(_self.payer!, (value) {
return _then(_self.copyWith(payer: value));
});
}
/// Create a copy of SnTransaction
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnWalletCopyWith<$Res>? get payee {
if (_self.payee == null) {
return null;
}
return $SnWalletCopyWith<$Res>(_self.payee!, (value) {
return _then(_self.copyWith(payee: value));
});
}
}
// dart format on

View File

@ -6,7 +6,8 @@ part of 'wallet.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_SnWallet _$SnWalletFromJson(Map<String, dynamic> json) => _SnWallet( _$SnWalletImpl _$$SnWalletImplFromJson(Map<String, dynamic> json) =>
_$SnWalletImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -18,7 +19,8 @@ _SnWallet _$SnWalletFromJson(Map<String, dynamic> json) => _SnWallet(
accountId: (json['account_id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(),
); );
Map<String, dynamic> _$SnWalletToJson(_SnWallet instance) => <String, dynamic>{ Map<String, dynamic> _$$SnWalletImplToJson(_$SnWalletImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
@ -28,8 +30,8 @@ Map<String, dynamic> _$SnWalletToJson(_SnWallet instance) => <String, dynamic>{
'account_id': instance.accountId, 'account_id': instance.accountId,
}; };
_SnTransaction _$SnTransactionFromJson(Map<String, dynamic> json) => _$SnTransactionImpl _$$SnTransactionImplFromJson(Map<String, dynamic> json) =>
_SnTransaction( _$SnTransactionImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
@ -48,7 +50,7 @@ _SnTransaction _$SnTransactionFromJson(Map<String, dynamic> json) =>
payeeId: (json['payee_id'] as num?)?.toInt(), payeeId: (json['payee_id'] as num?)?.toInt(),
); );
Map<String, dynamic> _$SnTransactionToJson(_SnTransaction instance) => Map<String, dynamic> _$$SnTransactionImplToJson(_$SnTransactionImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),

View File

@ -4,7 +4,7 @@ part 'websocket.freezed.dart';
part 'websocket.g.dart'; part 'websocket.g.dart';
@freezed @freezed
abstract class WebSocketPackage with _$WebSocketPackage { class WebSocketPackage with _$WebSocketPackage {
const factory WebSocketPackage({ const factory WebSocketPackage({
@JsonKey(name: 'w') @Default('unknown') String method, @JsonKey(name: 'w') @Default('unknown') String method,
@JsonKey(name: 'e') String? endpoint, @JsonKey(name: 'e') String? endpoint,

View File

@ -1,4 +1,3 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -10,59 +9,41 @@ part of 'websocket.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
WebSocketPackage _$WebSocketPackageFromJson(Map<String, dynamic> json) {
return _WebSocketPackage.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$WebSocketPackage { mixin _$WebSocketPackage {
@JsonKey(name: 'w') @JsonKey(name: 'w')
String get method; String get method => throw _privateConstructorUsedError;
@JsonKey(name: 'e') @JsonKey(name: 'e')
String? get endpoint; String? get endpoint => throw _privateConstructorUsedError;
@JsonKey(name: 'm') @JsonKey(name: 'm')
String? get message; String? get message => throw _privateConstructorUsedError;
@JsonKey(name: 'p') @JsonKey(name: 'p')
Map<String, dynamic>? get payload; Map<String, dynamic>? get payload => throw _privateConstructorUsedError;
/// Serializes this WebSocketPackage to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of WebSocketPackage /// Create a copy of WebSocketPackage
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$WebSocketPackageCopyWith<WebSocketPackage> get copyWith => $WebSocketPackageCopyWith<WebSocketPackage> get copyWith =>
_$WebSocketPackageCopyWithImpl<WebSocketPackage>( throw _privateConstructorUsedError;
this as WebSocketPackage, _$identity);
/// Serializes this WebSocketPackage to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is WebSocketPackage &&
(identical(other.method, method) || other.method == method) &&
(identical(other.endpoint, endpoint) ||
other.endpoint == endpoint) &&
(identical(other.message, message) || other.message == message) &&
const DeepCollectionEquality().equals(other.payload, payload));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, method, endpoint, message,
const DeepCollectionEquality().hash(payload));
@override
String toString() {
return 'WebSocketPackage(method: $method, endpoint: $endpoint, message: $message, payload: $payload)';
}
} }
/// @nodoc /// @nodoc
abstract mixin class $WebSocketPackageCopyWith<$Res> { abstract class $WebSocketPackageCopyWith<$Res> {
factory $WebSocketPackageCopyWith( factory $WebSocketPackageCopyWith(
WebSocketPackage value, $Res Function(WebSocketPackage) _then) = WebSocketPackage value, $Res Function(WebSocketPackage) then) =
_$WebSocketPackageCopyWithImpl; _$WebSocketPackageCopyWithImpl<$Res, WebSocketPackage>;
@useResult @useResult
$Res call( $Res call(
{@JsonKey(name: 'w') String method, {@JsonKey(name: 'w') String method,
@ -72,12 +53,14 @@ abstract mixin class $WebSocketPackageCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$WebSocketPackageCopyWithImpl<$Res> class _$WebSocketPackageCopyWithImpl<$Res, $Val extends WebSocketPackage>
implements $WebSocketPackageCopyWith<$Res> { implements $WebSocketPackageCopyWith<$Res> {
_$WebSocketPackageCopyWithImpl(this._self, this._then); _$WebSocketPackageCopyWithImpl(this._value, this._then);
final WebSocketPackage _self; // ignore: unused_field
final $Res Function(WebSocketPackage) _then; final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of WebSocketPackage /// Create a copy of WebSocketPackage
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -89,21 +72,75 @@ class _$WebSocketPackageCopyWithImpl<$Res>
Object? message = freezed, Object? message = freezed,
Object? payload = freezed, Object? payload = freezed,
}) { }) {
return _then(_self.copyWith( return _then(_value.copyWith(
method: null == method method: null == method
? _self.method ? _value.method
: method // ignore: cast_nullable_to_non_nullable : method // ignore: cast_nullable_to_non_nullable
as String, as String,
endpoint: freezed == endpoint endpoint: freezed == endpoint
? _self.endpoint ? _value.endpoint
: endpoint // ignore: cast_nullable_to_non_nullable : endpoint // ignore: cast_nullable_to_non_nullable
as String?, as String?,
message: freezed == message message: freezed == message
? _self.message ? _value.message
: message // ignore: cast_nullable_to_non_nullable : message // ignore: cast_nullable_to_non_nullable
as String?, as String?,
payload: freezed == payload payload: freezed == payload
? _self.payload ? _value.payload
: payload // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
) as $Val);
}
}
/// @nodoc
abstract class _$$WebSocketPackageImplCopyWith<$Res>
implements $WebSocketPackageCopyWith<$Res> {
factory _$$WebSocketPackageImplCopyWith(_$WebSocketPackageImpl value,
$Res Function(_$WebSocketPackageImpl) then) =
__$$WebSocketPackageImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'w') String method,
@JsonKey(name: 'e') String? endpoint,
@JsonKey(name: 'm') String? message,
@JsonKey(name: 'p') Map<String, dynamic>? payload});
}
/// @nodoc
class __$$WebSocketPackageImplCopyWithImpl<$Res>
extends _$WebSocketPackageCopyWithImpl<$Res, _$WebSocketPackageImpl>
implements _$$WebSocketPackageImplCopyWith<$Res> {
__$$WebSocketPackageImplCopyWithImpl(_$WebSocketPackageImpl _value,
$Res Function(_$WebSocketPackageImpl) _then)
: super(_value, _then);
/// Create a copy of WebSocketPackage
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? method = null,
Object? endpoint = freezed,
Object? message = freezed,
Object? payload = freezed,
}) {
return _then(_$WebSocketPackageImpl(
method: null == method
? _value.method
: method // ignore: cast_nullable_to_non_nullable
as String,
endpoint: freezed == endpoint
? _value.endpoint
: endpoint // ignore: cast_nullable_to_non_nullable
as String?,
message: freezed == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as String?,
payload: freezed == payload
? _value._payload
: payload // ignore: cast_nullable_to_non_nullable : payload // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?, as Map<String, dynamic>?,
)); ));
@ -112,15 +149,16 @@ class _$WebSocketPackageCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _WebSocketPackage implements WebSocketPackage { class _$WebSocketPackageImpl implements _WebSocketPackage {
const _WebSocketPackage( const _$WebSocketPackageImpl(
{@JsonKey(name: 'w') this.method = 'unknown', {@JsonKey(name: 'w') this.method = 'unknown',
@JsonKey(name: 'e') this.endpoint, @JsonKey(name: 'e') this.endpoint,
@JsonKey(name: 'm') this.message, @JsonKey(name: 'm') this.message,
@JsonKey(name: 'p') final Map<String, dynamic>? payload = const {}}) @JsonKey(name: 'p') final Map<String, dynamic>? payload = const {}})
: _payload = payload; : _payload = payload;
factory _WebSocketPackage.fromJson(Map<String, dynamic> json) =>
_$WebSocketPackageFromJson(json); factory _$WebSocketPackageImpl.fromJson(Map<String, dynamic> json) =>
_$$WebSocketPackageImplFromJson(json);
@override @override
@JsonKey(name: 'w') @JsonKey(name: 'w')
@ -142,26 +180,16 @@ class _WebSocketPackage implements WebSocketPackage {
return EqualUnmodifiableMapView(value); return EqualUnmodifiableMapView(value);
} }
/// Create a copy of WebSocketPackage
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) String toString() {
@pragma('vm:prefer-inline') return 'WebSocketPackage(method: $method, endpoint: $endpoint, message: $message, payload: $payload)';
_$WebSocketPackageCopyWith<_WebSocketPackage> get copyWith =>
__$WebSocketPackageCopyWithImpl<_WebSocketPackage>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$WebSocketPackageToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _WebSocketPackage && other is _$WebSocketPackageImpl &&
(identical(other.method, method) || other.method == method) && (identical(other.method, method) || other.method == method) &&
(identical(other.endpoint, endpoint) || (identical(other.endpoint, endpoint) ||
other.endpoint == endpoint) && other.endpoint == endpoint) &&
@ -174,64 +202,51 @@ class _WebSocketPackage implements WebSocketPackage {
int get hashCode => Object.hash(runtimeType, method, endpoint, message, int get hashCode => Object.hash(runtimeType, method, endpoint, message,
const DeepCollectionEquality().hash(_payload)); const DeepCollectionEquality().hash(_payload));
/// Create a copy of WebSocketPackage
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
String toString() { @pragma('vm:prefer-inline')
return 'WebSocketPackage(method: $method, endpoint: $endpoint, message: $message, payload: $payload)'; _$$WebSocketPackageImplCopyWith<_$WebSocketPackageImpl> get copyWith =>
} __$$WebSocketPackageImplCopyWithImpl<_$WebSocketPackageImpl>(
} this, _$identity);
/// @nodoc
abstract mixin class _$WebSocketPackageCopyWith<$Res>
implements $WebSocketPackageCopyWith<$Res> {
factory _$WebSocketPackageCopyWith(
_WebSocketPackage value, $Res Function(_WebSocketPackage) _then) =
__$WebSocketPackageCopyWithImpl;
@override @override
@useResult Map<String, dynamic> toJson() {
$Res call( return _$$WebSocketPackageImplToJson(
{@JsonKey(name: 'w') String method, this,
@JsonKey(name: 'e') String? endpoint, );
@JsonKey(name: 'm') String? message, }
@JsonKey(name: 'p') Map<String, dynamic>? payload});
} }
/// @nodoc abstract class _WebSocketPackage implements WebSocketPackage {
class __$WebSocketPackageCopyWithImpl<$Res> const factory _WebSocketPackage(
implements _$WebSocketPackageCopyWith<$Res> { {@JsonKey(name: 'w') final String method,
__$WebSocketPackageCopyWithImpl(this._self, this._then); @JsonKey(name: 'e') final String? endpoint,
@JsonKey(name: 'm') final String? message,
@JsonKey(name: 'p') final Map<String, dynamic>? payload}) =
_$WebSocketPackageImpl;
final _WebSocketPackage _self; factory _WebSocketPackage.fromJson(Map<String, dynamic> json) =
final $Res Function(_WebSocketPackage) _then; _$WebSocketPackageImpl.fromJson;
@override
@JsonKey(name: 'w')
String get method;
@override
@JsonKey(name: 'e')
String? get endpoint;
@override
@JsonKey(name: 'm')
String? get message;
@override
@JsonKey(name: 'p')
Map<String, dynamic>? get payload;
/// Create a copy of WebSocketPackage /// Create a copy of WebSocketPackage
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @JsonKey(includeFromJson: false, includeToJson: false)
$Res call({ _$$WebSocketPackageImplCopyWith<_$WebSocketPackageImpl> get copyWith =>
Object? method = null, throw _privateConstructorUsedError;
Object? endpoint = freezed,
Object? message = freezed,
Object? payload = freezed,
}) {
return _then(_WebSocketPackage(
method: null == method
? _self.method
: method // ignore: cast_nullable_to_non_nullable
as String,
endpoint: freezed == endpoint
? _self.endpoint
: endpoint // ignore: cast_nullable_to_non_nullable
as String?,
message: freezed == message
? _self.message
: message // ignore: cast_nullable_to_non_nullable
as String?,
payload: freezed == payload
? _self._payload
: payload // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
));
} }
}
// dart format on

View File

@ -6,15 +6,17 @@ part of 'websocket.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_WebSocketPackage _$WebSocketPackageFromJson(Map<String, dynamic> json) => _$WebSocketPackageImpl _$$WebSocketPackageImplFromJson(
_WebSocketPackage( Map<String, dynamic> json) =>
_$WebSocketPackageImpl(
method: json['w'] as String? ?? 'unknown', method: json['w'] as String? ?? 'unknown',
endpoint: json['e'] as String?, endpoint: json['e'] as String?,
message: json['m'] as String?, message: json['m'] as String?,
payload: json['p'] as Map<String, dynamic>? ?? const {}, payload: json['p'] as Map<String, dynamic>? ?? const {},
); );
Map<String, dynamic> _$WebSocketPackageToJson(_WebSocketPackage instance) => Map<String, dynamic> _$$WebSocketPackageImplToJson(
_$WebSocketPackageImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'w': instance.method, 'w': instance.method,
'e': instance.endpoint, 'e': instance.endpoint,

View File

@ -92,7 +92,8 @@ class OpenablePostItem extends StatelessWidget {
openColor: Colors.transparent, openColor: Colors.transparent,
openElevation: 0, openElevation: 0,
transitionType: ContainerTransitionType.fade, transitionType: ContainerTransitionType.fade,
closedColor: Theme.of(context).colorScheme.surfaceContainerLow.withOpacity( closedColor:
Theme.of(context).colorScheme.surfaceContainerLow.withOpacity(
cfg.prefs.getBool(kAppBackgroundStoreKey) == true ? 0.75 : 1, cfg.prefs.getBool(kAppBackgroundStoreKey) == true ? 0.75 : 1,
), ),
closedShape: const RoundedRectangleBorder( closedShape: const RoundedRectangleBorder(
@ -135,9 +136,11 @@ class PostItem extends StatelessWidget {
final box = context.findRenderObject() as RenderBox?; final box = context.findRenderObject() as RenderBox?;
final url = 'https://solsynth.dev/posts/${data.id}'; final url = 'https://solsynth.dev/posts/${data.id}';
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) { if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
Share.shareUri(Uri.parse(url), sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size); Share.shareUri(Uri.parse(url),
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size);
} else { } else {
Share.share(url, sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size); Share.share(url,
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size);
} }
} }
@ -155,7 +158,8 @@ class PostItem extends StatelessWidget {
child: MultiProvider( child: MultiProvider(
providers: [ providers: [
Provider<SnNetworkProvider>(create: (_) => context.read()), Provider<SnNetworkProvider>(create: (_) => context.read()),
ChangeNotifierProvider<ConfigProvider>(create: (_) => context.read()), ChangeNotifierProvider<ConfigProvider>(
create: (_) => context.read()),
], ],
child: ResponsiveBreakpoints.builder( child: ResponsiveBreakpoints.builder(
breakpoints: ResponsiveBreakpoints.of(context).breakpoints, breakpoints: ResponsiveBreakpoints.of(context).breakpoints,
@ -183,7 +187,8 @@ class PostItem extends StatelessWidget {
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
); );
} else { } else {
await FileSaver.instance.saveFile(name: 'Solar Network Post #${data.id}.png', file: imageFile); await FileSaver.instance.saveFile(
name: 'Solar Network Post #${data.id}.png', file: imageFile);
} }
await imageFile.delete(); await imageFile.delete();
@ -197,7 +202,9 @@ class PostItem extends StatelessWidget {
final isAuthor = ua.isAuthorized && data.publisher.accountId == ua.user?.id; final isAuthor = ua.isAuthorized && data.publisher.accountId == ua.user?.id;
// Video full view // Video full view
if (showFullPost && data.type == 'video' && ResponsiveBreakpoints.of(context).largerThan(TABLET)) { if (showFullPost &&
data.type == 'video' &&
ResponsiveBreakpoints.of(context).largerThan(TABLET)) {
return Row( return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -217,7 +224,8 @@ class PostItem extends StatelessWidget {
if (onDeleted != null) {} if (onDeleted != null) {}
}, },
).padding(bottom: 8), ).padding(bottom: 8),
if (data.preload?.video != null) _PostVideoPlayer(data: data).padding(bottom: 8), if (data.preload?.video != null)
_PostVideoPlayer(data: data).padding(bottom: 8),
_PostHeadline(data: data).padding(horizontal: 4, bottom: 8), _PostHeadline(data: data).padding(horizontal: 4, bottom: 8),
_PostFeaturedComment(data: data), _PostFeaturedComment(data: data),
_PostBottomAction( _PostBottomAction(
@ -265,7 +273,8 @@ class PostItem extends StatelessWidget {
if (onDeleted != null) {} if (onDeleted != null) {}
}, },
).padding(horizontal: 12, top: 8, bottom: 8), ).padding(horizontal: 12, top: 8, bottom: 8),
if (data.preload?.video != null) _PostVideoPlayer(data: data).padding(horizontal: 12, bottom: 8), if (data.preload?.video != null)
_PostVideoPlayer(data: data).padding(horizontal: 12, bottom: 8),
Container( Container(
width: double.infinity, width: double.infinity,
margin: const EdgeInsets.only(bottom: 4, left: 12, right: 12), margin: const EdgeInsets.only(bottom: 4, left: 12, right: 12),
@ -308,8 +317,13 @@ class PostItem extends StatelessWidget {
], ],
), ),
), ),
Text('postArticle').tr().fontSize(13).opacity(0.75).padding(horizontal: 24, bottom: 8), Text('postArticle')
_PostFeaturedComment(data: data, maxWidth: maxWidth).padding(horizontal: 12), .tr()
.fontSize(13)
.opacity(0.75)
.padding(horizontal: 24, bottom: 8),
_PostFeaturedComment(data: data, maxWidth: maxWidth)
.padding(horizontal: 12),
_PostBottomAction( _PostBottomAction(
data: data, data: data,
showComments: showComments, showComments: showComments,
@ -324,7 +338,8 @@ class PostItem extends StatelessWidget {
} }
final displayableAttachments = data.preload?.attachments final displayableAttachments = data.preload?.attachments
?.where((ele) => ele?.mediaType != SnMediaType.image || data.type != 'article') ?.where((ele) =>
ele?.mediaType != SnMediaType.image || data.type != 'article')
.toList(); .toList();
final cfg = context.read<ConfigProvider>(); final cfg = context.read<ConfigProvider>();
@ -349,9 +364,13 @@ class PostItem extends StatelessWidget {
if (onDeleted != null) onDeleted!(); if (onDeleted != null) onDeleted!();
}, },
).padding(horizontal: 12, vertical: 8), ).padding(horizontal: 12, vertical: 8),
if (data.preload?.video != null) _PostVideoPlayer(data: data).padding(horizontal: 12, bottom: 8), if (data.preload?.video != null)
if (data.type == 'question') _PostQuestionHint(data: data).padding(horizontal: 16, bottom: 8), _PostVideoPlayer(data: data).padding(horizontal: 12, bottom: 8),
if (data.body['title'] != null || data.body['description'] != null) if (data.type == 'question')
_PostQuestionHint(data: data)
.padding(horizontal: 16, bottom: 8),
if (data.body['title'] != null ||
data.body['description'] != null)
_PostHeadline( _PostHeadline(
data: data, data: data,
isEnlarge: data.type == 'article' && showFullPost, isEnlarge: data.type == 'article' && showFullPost,
@ -365,7 +384,8 @@ class PostItem extends StatelessWidget {
if (data.repostTo != null) if (data.repostTo != null)
_PostQuoteContent(child: data.repostTo!).padding( _PostQuoteContent(child: data.repostTo!).padding(
horizontal: 12, horizontal: 12,
bottom: data.preload?.attachments?.isNotEmpty ?? false ? 12 : 0, bottom:
data.preload?.attachments?.isNotEmpty ?? false ? 12 : 0,
), ),
if (data.visibility > 0) if (data.visibility > 0)
_PostVisibilityHint(data: data).padding( _PostVisibilityHint(data: data).padding(
@ -377,7 +397,9 @@ class PostItem extends StatelessWidget {
horizontal: 16, horizontal: 16,
vertical: 4, vertical: 4,
), ),
if (data.tags.isNotEmpty) _PostTagsList(data: data).padding(horizontal: 16, top: 4, bottom: 6), if (data.tags.isNotEmpty)
_PostTagsList(data: data)
.padding(horizontal: 16, top: 4, bottom: 6),
], ],
), ),
), ),
@ -390,12 +412,16 @@ class PostItem extends StatelessWidget {
fit: showFullPost ? BoxFit.cover : BoxFit.contain, fit: showFullPost ? BoxFit.cover : BoxFit.contain,
padding: const EdgeInsets.symmetric(horizontal: 12), padding: const EdgeInsets.symmetric(horizontal: 12),
), ),
if (data.preload?.poll != null) PostPoll(poll: data.preload!.poll!).padding(horizontal: 12, vertical: 4), if (data.preload?.poll != null)
if (data.body['content'] != null && (cfg.prefs.getBool(kAppExpandPostLink) ?? true)) PostPoll(poll: data.preload!.poll!)
.padding(horizontal: 12, vertical: 4),
if (data.body['content'] != null &&
(cfg.prefs.getBool(kAppExpandPostLink) ?? true))
LinkPreviewWidget( LinkPreviewWidget(
text: data.body['content'], text: data.body['content'],
).padding(horizontal: 4), ).padding(horizontal: 4),
_PostFeaturedComment(data: data, maxWidth: maxWidth).padding(horizontal: 12), _PostFeaturedComment(data: data, maxWidth: maxWidth)
.padding(horizontal: 12),
Container( Container(
constraints: BoxConstraints(maxWidth: maxWidth ?? double.infinity), constraints: BoxConstraints(maxWidth: maxWidth ?? double.infinity),
child: Column( child: Column(
@ -457,7 +483,8 @@ class PostShareImageWidget extends StatelessWidget {
showMenu: false, showMenu: false,
isRelativeDate: false, isRelativeDate: false,
).padding(horizontal: 16, bottom: 8), ).padding(horizontal: 16, bottom: 8),
if (data.type == 'question') _PostQuestionHint(data: data).padding(horizontal: 16, bottom: 8), if (data.type == 'question')
_PostQuestionHint(data: data).padding(horizontal: 16, bottom: 8),
_PostHeadline( _PostHeadline(
data: data, data: data,
isEnlarge: data.type == 'article', isEnlarge: data.type == 'article',
@ -472,7 +499,8 @@ class PostShareImageWidget extends StatelessWidget {
child: data.repostTo!, child: data.repostTo!,
isRelativeDate: false, isRelativeDate: false,
).padding(horizontal: 16, bottom: 8), ).padding(horizontal: 16, bottom: 8),
if (data.type != 'article' && (data.preload?.attachments?.isNotEmpty ?? false)) if (data.type != 'article' &&
(data.preload?.attachments?.isNotEmpty ?? false))
StyledWidget(AttachmentList( StyledWidget(AttachmentList(
data: data.preload!.attachments!, data: data.preload!.attachments!,
columned: true, columned: true,
@ -481,7 +509,8 @@ class PostShareImageWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (data.visibility > 0) _PostVisibilityHint(data: data), if (data.visibility > 0) _PostVisibilityHint(data: data),
if (data.body['content_truncated'] == true) _PostTruncatedHint(data: data), if (data.body['content_truncated'] == true)
_PostTruncatedHint(data: data),
], ],
).padding(horizontal: 16), ).padding(horizontal: 16),
_PostBottomAction( _PostBottomAction(
@ -541,7 +570,8 @@ class PostShareImageWidget extends StatelessWidget {
version: QrVersions.auto, version: QrVersions.auto,
size: 100, size: 100,
gapless: true, gapless: true,
embeddedImage: AssetImage('assets/icon/icon-light-radius.png'), embeddedImage:
AssetImage('assets/icon/icon-light-radius.png'),
embeddedImageStyle: QrEmbeddedImageStyle( embeddedImageStyle: QrEmbeddedImageStyle(
size: Size(28, 28), size: Size(28, 28),
), ),
@ -572,9 +602,11 @@ class _PostQuestionHint extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
children: [ children: [
Icon(data.body['answer'] == null ? Symbols.help : Symbols.check_circle, size: 20), Icon(data.body['answer'] == null ? Symbols.help : Symbols.check_circle,
size: 20),
const Gap(4), const Gap(4),
if (data.body['answer'] == null && data.body['reward']?.toDouble() != null) if (data.body['answer'] == null &&
data.body['reward']?.toDouble() != null)
Text('postQuestionUnansweredWithReward'.tr(args: [ Text('postQuestionUnansweredWithReward'.tr(args: [
'${data.body['reward']}', '${data.body['reward']}',
])).opacity(0.75) ])).opacity(0.75)
@ -610,7 +642,9 @@ class _PostBottomAction extends StatelessWidget {
); );
final String? mostTypicalReaction = data.metric.reactionList.isNotEmpty final String? mostTypicalReaction = data.metric.reactionList.isNotEmpty
? data.metric.reactionList.entries.reduce((a, b) => a.value > b.value ? a : b).key ? data.metric.reactionList.entries
.reduce((a, b) => a.value > b.value ? a : b)
.key
: null; : null;
return Row( return Row(
@ -624,7 +658,8 @@ class _PostBottomAction extends StatelessWidget {
InkWell( InkWell(
child: Row( child: Row(
children: [ children: [
if (mostTypicalReaction == null || kTemplateReactions[mostTypicalReaction] == null) if (mostTypicalReaction == null ||
kTemplateReactions[mostTypicalReaction] == null)
Icon(Symbols.add_reaction, size: 20, color: iconColor) Icon(Symbols.add_reaction, size: 20, color: iconColor)
else else
Text( Text(
@ -636,7 +671,8 @@ class _PostBottomAction extends StatelessWidget {
), ),
), ),
const Gap(8), const Gap(8),
if (data.totalUpvote > 0 && data.totalUpvote >= data.totalDownvote) if (data.totalUpvote > 0 &&
data.totalUpvote >= data.totalDownvote)
Text('postReactionUpvote').plural( Text('postReactionUpvote').plural(
data.totalUpvote, data.totalUpvote,
) )
@ -655,8 +691,12 @@ class _PostBottomAction extends StatelessWidget {
data: data, data: data,
onChanged: (value, attr, delta) { onChanged: (value, attr, delta) {
onChanged(data.copyWith( onChanged(data.copyWith(
totalUpvote: attr == 1 ? data.totalUpvote + delta : data.totalUpvote, totalUpvote: attr == 1
totalDownvote: attr == 2 ? data.totalDownvote + delta : data.totalDownvote, ? data.totalUpvote + delta
: data.totalUpvote,
totalDownvote: attr == 2
? data.totalDownvote + delta
: data.totalDownvote,
metric: data.metric.copyWith(reactionList: value), metric: data.metric.copyWith(reactionList: value),
)); ));
}, },
@ -763,7 +803,7 @@ class _PostHeadline extends StatelessWidget {
children: [ children: [
Text( Text(
'articleWrittenAt'.tr( 'articleWrittenAt'.tr(
args: [DateFormat('y/M/d HH:mm').format(data.createdAt.toLocal())], args: [DateFormat('y/M/d HH:mm').format(data.createdAt)],
), ),
style: TextStyle(fontSize: 13), style: TextStyle(fontSize: 13),
), ),
@ -771,7 +811,7 @@ class _PostHeadline extends StatelessWidget {
if (data.editedAt != null) if (data.editedAt != null)
Text( Text(
'articleEditedAt'.tr( 'articleEditedAt'.tr(
args: [DateFormat('y/M/d HH:mm').format(data.editedAt!.toLocal())], args: [DateFormat('y/M/d HH:mm').format(data.editedAt!)],
), ),
style: TextStyle(fontSize: 13), style: TextStyle(fontSize: 13),
), ),
@ -904,8 +944,10 @@ class _PostContentHeader extends StatelessWidget {
const Gap(4), const Gap(4),
Text( Text(
isRelativeDate isRelativeDate
? RelativeTime(context).format((data.publishedAt ?? data.createdAt).toLocal()) ? RelativeTime(context)
: DateFormat('y/M/d HH:mm').format((data.publishedAt ?? data.createdAt).toLocal()), .format(data.publishedAt ?? data.createdAt)
: DateFormat('y/M/d HH:mm')
.format(data.publishedAt ?? data.createdAt),
).fontSize(13), ).fontSize(13),
], ],
).opacity(0.8), ).opacity(0.8),
@ -923,8 +965,10 @@ class _PostContentHeader extends StatelessWidget {
const Gap(4), const Gap(4),
Text( Text(
isRelativeDate isRelativeDate
? RelativeTime(context).format((data.publishedAt ?? data.createdAt).toLocal()) ? RelativeTime(context)
: DateFormat('y/M/d HH:mm').format((data.publishedAt ?? data.createdAt).toLocal()), .format(data.publishedAt ?? data.createdAt)
: DateFormat('y/M/d HH:mm')
.format(data.publishedAt ?? data.createdAt),
).fontSize(13), ).fontSize(13),
], ],
).opacity(0.8), ).opacity(0.8),
@ -1107,7 +1151,8 @@ class _PostContentBody extends StatelessWidget {
if (data.body['content'] == null) return const SizedBox.shrink(); if (data.body['content'] == null) return const SizedBox.shrink();
final content = MarkdownTextContent( final content = MarkdownTextContent(
isAutoWarp: data.type == 'story', isAutoWarp: data.type == 'story',
isEnlargeSticker: RegExp(r"^:([-\w]+):$").hasMatch(data.body['content'] ?? ''), isEnlargeSticker:
RegExp(r"^:([-\w]+):$").hasMatch(data.body['content'] ?? ''),
textScaler: isEnlarge ? TextScaler.linear(1.1) : null, textScaler: isEnlarge ? TextScaler.linear(1.1) : null,
content: data.body['content'], content: data.body['content'],
attachments: data.preload?.attachments, attachments: data.preload?.attachments,
@ -1156,10 +1201,12 @@ class _PostQuoteContent extends StatelessWidget {
onDeleted: () {}, onDeleted: () {},
).padding(bottom: 4), ).padding(bottom: 4),
_PostContentBody(data: child), _PostContentBody(data: child),
if (child.visibility > 0) _PostVisibilityHint(data: child).padding(top: 4), if (child.visibility > 0)
_PostVisibilityHint(data: child).padding(top: 4),
], ],
).padding(horizontal: 16), ).padding(horizontal: 16),
if (child.type != 'article' && (child.preload?.attachments?.isNotEmpty ?? false)) if (child.type != 'article' &&
(child.preload?.attachments?.isNotEmpty ?? false))
ClipRRect( ClipRRect(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(8), bottomLeft: Radius.circular(8),
@ -1310,7 +1357,9 @@ class _PostTruncatedHint extends StatelessWidget {
const Gap(4), const Gap(4),
Text('postReadEstimate').tr(args: [ Text('postReadEstimate').tr(args: [
'${Duration( '${Duration(
seconds: (data.body['content_length'] as num).toDouble() * 60 ~/ kHumanReadSpeed, seconds: (data.body['content_length'] as num).toDouble() *
60 ~/
kHumanReadSpeed,
).inSeconds}s', ).inSeconds}s',
]), ]),
], ],
@ -1349,7 +1398,8 @@ class _PostFeaturedCommentState extends State<_PostFeaturedComment> {
// If this is a answered question, fetch the answer instead // If this is a answered question, fetch the answer instead
if (widget.data.type == 'question' && widget.data.body['answer'] != null) { if (widget.data.type == 'question' && widget.data.body['answer'] != null) {
final sn = context.read<SnNetworkProvider>(); final sn = context.read<SnNetworkProvider>();
final resp = await sn.client.get('/cgi/co/posts/${widget.data.body['answer']}'); final resp =
await sn.client.get('/cgi/co/posts/${widget.data.body['answer']}');
_isAnswer = true; _isAnswer = true;
setState(() => _featuredComment = SnPost.fromJson(resp.data)); setState(() => _featuredComment = SnPost.fromJson(resp.data));
return; return;
@ -1357,7 +1407,9 @@ class _PostFeaturedCommentState extends State<_PostFeaturedComment> {
try { try {
final sn = context.read<SnNetworkProvider>(); final sn = context.read<SnNetworkProvider>();
final resp = await sn.client.get('/cgi/co/posts/${widget.data.id}/replies/featured', queryParameters: { final resp = await sn.client.get(
'/cgi/co/posts/${widget.data.id}/replies/featured',
queryParameters: {
'take': 1, 'take': 1,
}); });
setState(() => _featuredComment = SnPost.fromJson(resp.data[0])); setState(() => _featuredComment = SnPost.fromJson(resp.data[0]));
@ -1388,7 +1440,9 @@ class _PostFeaturedCommentState extends State<_PostFeaturedComment> {
width: double.infinity, width: double.infinity,
child: Material( child: Material(
borderRadius: const BorderRadius.all(Radius.circular(8)), borderRadius: const BorderRadius.all(Radius.circular(8)),
color: _isAnswer ? Colors.green.withOpacity(0.5) : Theme.of(context).colorScheme.surfaceContainerHigh, color: _isAnswer
? Colors.green.withOpacity(0.5)
: Theme.of(context).colorScheme.surfaceContainerHigh,
child: InkWell( child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(8)), borderRadius: const BorderRadius.all(Radius.circular(8)),
onTap: () { onTap: () {
@ -1408,11 +1462,17 @@ class _PostFeaturedCommentState extends State<_PostFeaturedComment> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
const Gap(2), const Gap(2),
Icon(_isAnswer ? Symbols.task_alt : Symbols.prompt_suggestion, size: 20), Icon(_isAnswer ? Symbols.task_alt : Symbols.prompt_suggestion,
size: 20),
const Gap(10), const Gap(10),
Text( Text(
_isAnswer ? 'postQuestionAnswerTitle' : 'postFeaturedComment', _isAnswer
style: Theme.of(context).textTheme.titleMedium!.copyWith(fontSize: 15), ? 'postQuestionAnswerTitle'
: 'postFeaturedComment',
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(fontSize: 15),
).tr(), ).tr(),
], ],
), ),
@ -1550,7 +1610,8 @@ class _PostGetInsightPopupState extends State<_PostGetInsightPopup> {
} }
RegExp cleanThinkingRegExp = RegExp(r'<think>[\s\S]*?</think>'); RegExp cleanThinkingRegExp = RegExp(r'<think>[\s\S]*?</think>');
setState(() => _response = out.replaceAll(cleanThinkingRegExp, '').trim()); setState(
() => _response = out.replaceAll(cleanThinkingRegExp, '').trim());
} catch (err) { } catch (err) {
if (!mounted) return; if (!mounted) return;
context.showErrorDialog(err); context.showErrorDialog(err);
@ -1573,11 +1634,16 @@ class _PostGetInsightPopupState extends State<_PostGetInsightPopup> {
children: [ children: [
const Icon(Symbols.book_4_spark, size: 24), const Icon(Symbols.book_4_spark, size: 24),
const Gap(16), const Gap(16),
Text('postGetInsightTitle', style: Theme.of(context).textTheme.titleLarge).tr(), Text('postGetInsightTitle',
style: Theme.of(context).textTheme.titleLarge)
.tr(),
], ],
).padding(horizontal: 20, top: 16, bottom: 12), ).padding(horizontal: 20, top: 16, bottom: 12),
const Gap(4), const Gap(4),
Text('postGetInsightDescription', style: Theme.of(context).textTheme.bodySmall).tr().padding(horizontal: 20), Text('postGetInsightDescription',
style: Theme.of(context).textTheme.bodySmall)
.tr()
.padding(horizontal: 20),
const Gap(4), const Gap(4),
if (_response == null) if (_response == null)
Expanded( Expanded(
@ -1595,12 +1661,16 @@ class _PostGetInsightPopupState extends State<_PostGetInsightPopup> {
leading: const Icon(Symbols.info), leading: const Icon(Symbols.info),
title: Text('aiThinkingProcess'.tr()), title: Text('aiThinkingProcess'.tr()),
tilePadding: const EdgeInsets.symmetric(horizontal: 20), tilePadding: const EdgeInsets.symmetric(horizontal: 20),
collapsedBackgroundColor: Theme.of(context).colorScheme.surfaceContainerHigh, collapsedBackgroundColor:
Theme.of(context).colorScheme.surfaceContainerHigh,
minTileHeight: 32, minTileHeight: 32,
children: [ children: [
SelectableText( SelectableText(
_thinkingProcess!, _thinkingProcess!,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(fontStyle: FontStyle.italic), style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(fontStyle: FontStyle.italic),
).padding(horizontal: 20, vertical: 8), ).padding(horizontal: 20, vertical: 8),
], ],
).padding(vertical: 8), ).padding(vertical: 8),
@ -1637,7 +1707,8 @@ class _PostVideoPlayer extends StatelessWidget {
aspectRatio: 16 / 9, aspectRatio: 16 / 9,
child: ClipRRect( child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(8)), borderRadius: const BorderRadius.all(Radius.circular(8)),
child: AttachmentItem(data: data.preload!.video!, heroTag: 'post-video-${data.id}'), child: AttachmentItem(
data: data.preload!.video!, heroTag: 'post-video-${data.id}'),
), ),
), ),
); );

View File

@ -406,9 +406,8 @@ class _PostMediaPendingItem extends StatelessWidget {
FutureBuilder<int?>( FutureBuilder<int?>(
future: media.length(), future: media.length(),
builder: (context, snapshot) { builder: (context, snapshot) {
if (!snapshot.hasData) { if (!snapshot.hasData)
return const SizedBox.shrink(); return const SizedBox.shrink();
}
return Text( return Text(
snapshot.data!.formatBytes(), snapshot.data!.formatBytes(),
style: GoogleFonts.robotoMono(fontSize: 13), style: GoogleFonts.robotoMono(fontSize: 13),

View File

@ -9,7 +9,6 @@
#include <bitsdojo_window_linux/bitsdojo_window_plugin.h> #include <bitsdojo_window_linux/bitsdojo_window_plugin.h>
#include <file_saver/file_saver_plugin.h> #include <file_saver/file_saver_plugin.h>
#include <file_selector_linux/file_selector_plugin.h> #include <file_selector_linux/file_selector_plugin.h>
#include <flutter_timezone/flutter_timezone_plugin.h>
#include <flutter_udid/flutter_udid_plugin.h> #include <flutter_udid/flutter_udid_plugin.h>
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h> #include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
#include <hotkey_manager_linux/hotkey_manager_linux_plugin.h> #include <hotkey_manager_linux/hotkey_manager_linux_plugin.h>
@ -31,9 +30,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar); file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_timezone_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterTimezonePlugin");
flutter_timezone_plugin_register_with_registrar(flutter_timezone_registrar);
g_autoptr(FlPluginRegistrar) flutter_udid_registrar = g_autoptr(FlPluginRegistrar) flutter_udid_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterUdidPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterUdidPlugin");
flutter_udid_plugin_register_with_registrar(flutter_udid_registrar); flutter_udid_plugin_register_with_registrar(flutter_udid_registrar);

View File

@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
bitsdojo_window_linux bitsdojo_window_linux
file_saver file_saver
file_selector_linux file_selector_linux
flutter_timezone
flutter_udid flutter_udid
flutter_webrtc flutter_webrtc
hotkey_manager_linux hotkey_manager_linux

View File

@ -15,11 +15,9 @@ import firebase_analytics
import firebase_core import firebase_core
import firebase_messaging import firebase_messaging
import flutter_inappwebview_macos import flutter_inappwebview_macos
import flutter_timezone
import flutter_udid import flutter_udid
import flutter_webrtc import flutter_webrtc
import gal import gal
import geolocator_apple
import hotkey_manager_macos import hotkey_manager_macos
import in_app_review import in_app_review
import livekit_client import livekit_client
@ -50,11 +48,9 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin")) InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin"))
FlutterUdidPlugin.register(with: registry.registrar(forPlugin: "FlutterUdidPlugin")) FlutterUdidPlugin.register(with: registry.registrar(forPlugin: "FlutterUdidPlugin"))
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin")) FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin")) GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
HotkeyManagerMacosPlugin.register(with: registry.registrar(forPlugin: "HotkeyManagerMacosPlugin")) HotkeyManagerMacosPlugin.register(with: registry.registrar(forPlugin: "HotkeyManagerMacosPlugin"))
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin")) InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin")) LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))

View File

@ -13,10 +13,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _flutterfire_internals name: _flutterfire_internals
sha256: "7fd72d77a7487c26faab1d274af23fb008763ddc10800261abbfb2c067f183d5" sha256: "401dd18096f5eaa140404ccbbbf346f83c850e6f27049698a7ee75a3488ddb32"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.53" version: "1.3.52"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
@ -45,10 +45,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" sha256: "528579c7e4579719f04b21eeeeddfd73a18b31dabc22766893b7d1be7f49b967"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.4" version: "4.0.3"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -173,10 +173,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: built_value name: built_value
sha256: "8b158ab94ec6913e480dc3f752418348b5ae099eb75868b5f4775f0572999c61" sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.9.4" version: "8.9.3"
cached_network_image: cached_network_image:
dependency: "direct main" dependency: "direct main"
description: description:
@ -345,14 +345,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.8" version: "1.0.8"
dart_earcut:
dependency: transitive
description:
name: dart_earcut
sha256: e485001bfc05dcbc437d7bfb666316182e3522d4c3f9668048e004d0eb2ce43b
url: "https://pub.dev"
source: hosted
version: "1.2.0"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@ -381,10 +373,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: device_info_plus name: device_info_plus
sha256: "610739247975c2d0de43482afa13ec1018f63c9fddf97ef3d8dc895faa3b4543" sha256: "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.3.2" version: "11.3.0"
device_info_plus_platform_interface: device_info_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -533,10 +525,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker name: file_picker
sha256: "7423298f08f6fc8cce05792bae329f9a93653fc9c08712831b1a55540127995d" sha256: "9467b7c4eedf0bd4c9306b0ec12455b278f6366962be061d0978a446c103c111"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.0.2" version: "9.0.1"
file_saver: file_saver:
dependency: "direct main" dependency: "direct main"
description: description:
@ -581,34 +573,34 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_analytics name: firebase_analytics
sha256: "81a582e9348216fcf6b30878487369325bf78b8ddd752ed176949c8e4fd4aaac" sha256: "6abce50b79729d8a13c3d4ae05ac612d5ef2f57394330bc5e581ca0e762325f4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.4.4" version: "11.4.3"
firebase_analytics_platform_interface: firebase_analytics_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_analytics_platform_interface name: firebase_analytics_platform_interface
sha256: "5ae7bd4a551b67009cd0676f5407331b202eaf16e0a80dcf7b40cd0a34a18746" sha256: cd9ae65870bf23ab7e63a04fe9c1b38522fd3556a8c32288afd3f5cb10d4b8f4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.3.4" version: "4.3.3"
firebase_analytics_web: firebase_analytics_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_analytics_web name: firebase_analytics_web
sha256: "15fd7459fea2a00958dbf9b86cd8ad14d3ce2db13950308af7c7717e89ccc5c2" sha256: "5654ed7e39d7a8099e60748924327159785512d78d913e965f9ca93c533af910"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.10+10" version: "0.5.10+9"
firebase_core: firebase_core:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_core name: firebase_core
sha256: f4d8f49574a4e396f34567f3eec4d38ab9c3910818dec22ca42b2a467c685d8b sha256: "6a4ea0f1d533443c8afc3d809cd36a4e2b8f2e2e711f697974f55bb31d71d1b8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.12.1" version: "3.12.0"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -621,34 +613,34 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
sha256: faa5a76f6380a9b90b53bc3bdcb85bc7926a382e0709b9b5edac9f7746651493 sha256: e47f5c2776de018fa19bc9f6f723df136bc75cdb164d64b65305babd715c8e41
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.21.1" version: "2.21.0"
firebase_messaging: firebase_messaging:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_messaging name: firebase_messaging
sha256: "5fc345c6341f9dc69fd0ffcbf508c784fd6d1b9e9f249587f30434dd8b6aa281" sha256: "8755a083a20bac4485e8b46d223f6f2eab34e659a76a75f8cf3cded53bc98a15"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "15.2.4" version: "15.2.3"
firebase_messaging_platform_interface: firebase_messaging_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_platform_interface name: firebase_messaging_platform_interface
sha256: a935924cf40925985c8049df4968b1dde5c704f570f3ce380b31d3de6990dd94 sha256: "8cc771079677460de53ad8fcca5bc3074d58c5fc4f9d89b19585e5bfd9c64292"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.6.4" version: "4.6.3"
firebase_messaging_web: firebase_messaging_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_web name: firebase_messaging_web
sha256: fafebf6a1921931334f3f10edb5037a5712288efdd022881e2d093e5654a2fd4 sha256: caa73059b0396c97f691683c4cfc3f897c8543801579b7dd4851c431d8e4e091
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.10.4" version: "3.10.3"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -811,14 +803,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_map:
dependency: "direct main"
description:
name: flutter_map
sha256: bbf145e8220531f2f727608c431871c7457f3b134e513543913afd00fdc1cd47
url: "https://pub.dev"
source: hosted
version: "8.1.0"
flutter_markdown: flutter_markdown:
dependency: "direct main" dependency: "direct main"
description: description:
@ -855,10 +839,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: flutter_plugin_android_lifecycle name: flutter_plugin_android_lifecycle
sha256: "1c2b787f99bdca1f3718543f81d38aa1b124817dfeb9fb196201bea85b6134bf" sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.26" version: "2.0.24"
flutter_shaders: flutter_shaders:
dependency: transitive dependency: transitive
description: description:
@ -888,14 +872,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_timezone:
dependency: "direct main"
description:
name: flutter_timezone
sha256: bc286cecb0366d88e6c4644e3962ebd1ce1d233abc658eb1e0cd803389f84b64
url: "https://pub.dev"
source: hosted
version: "4.1.0"
flutter_udid: flutter_udid:
dependency: "direct main" dependency: "direct main"
description: description:
@ -921,10 +897,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: freezed name: freezed
sha256: a3d6429368603a591ca7c1795799a247998fb213ded509070c2c59708b25df31 sha256: "532008570b7fd20310db8cb9c8ebc5bafd5aa4e52c4358db4e5ddc29f74f4be3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.2" version: "3.0.1"
freezed_annotation: freezed_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
@ -957,54 +933,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.1"
geolocator:
dependency: "direct main"
description:
name: geolocator
sha256: d2ec66329cab29cb297d51d96c067d457ca519dca8589665fa0b82ebacb7dbe4
url: "https://pub.dev"
source: hosted
version: "13.0.2"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47"
url: "https://pub.dev"
source: hosted
version: "4.6.1"
geolocator_apple:
dependency: transitive
description:
name: geolocator_apple
sha256: c4ecead17985ede9634f21500072edfcb3dba0ef7b97f8d7bc556d2d722b3ba3
url: "https://pub.dev"
source: hosted
version: "2.3.9"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
sha256: "2ed69328e05cd94e7eb48bb0535f5fc0c0c44d1c4fa1e9737267484d05c29b5e"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
geolocator_windows:
dependency: transitive
description:
name: geolocator_windows
sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e"
url: "https://pub.dev"
source: hosted
version: "0.2.3"
glob: glob:
dependency: transitive dependency: transitive
description: description:
@ -1017,10 +945,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: go_router name: go_router
sha256: f02fd7d2a4dc512fec615529824fdd217fecb3a3d3de68360293a551f21634b3 sha256: "04539267a740931c6d4479a10d466717ca5901c6fdfd3fcda09391bbb8ebd651"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.8.1" version: "14.8.0"
google_fonts: google_fonts:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1269,14 +1197,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.9.4" version: "6.9.4"
latlong2:
dependency: transitive
description:
name: latlong2
sha256: "98227922caf49e6056f91b6c56945ea1c7b166f28ffcd5fb8e72fc0b453cc8fe"
url: "https://pub.dev"
source: hosted
version: "0.9.1"
leak_tracker: leak_tracker:
dependency: transitive dependency: transitive
description: description:
@ -1317,14 +1237,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.1.1" version: "5.1.1"
lists:
dependency: transitive
description:
name: lists
sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
livekit_client: livekit_client:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1341,14 +1253,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.6" version: "0.1.6"
logger:
dependency: transitive
description:
name: logger
sha256: be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1
url: "https://pub.dev"
source: hosted
version: "2.5.0"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -1485,14 +1389,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.16.0" version: "1.16.0"
mgrs_dart:
dependency: transitive
description:
name: mgrs_dart
sha256: fb89ae62f05fa0bb90f70c31fc870bcbcfd516c843fb554452ab3396f78586f7
url: "https://pub.dev"
source: hosted
version: "2.0.0"
mime: mime:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1709,14 +1605,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.8" version: "2.1.8"
polylabel:
dependency: transitive
description:
name: polylabel
sha256: "41b9099afb2aa6c1730bdd8a0fab1400d287694ec7615dd8516935fa3144214b"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
pool: pool:
dependency: transitive dependency: transitive
description: description:
@ -1741,14 +1629,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.1" version: "6.0.1"
proj4dart:
dependency: transitive
description:
name: proj4dart
sha256: c8a659ac9b6864aa47c171e78d41bbe6f5e1d7bd790a5814249e6b68bc44324e
url: "https://pub.dev"
source: hosted
version: "2.1.0"
protobuf: protobuf:
dependency: transitive dependency: transitive
description: description:
@ -2266,14 +2146,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.3" version: "0.1.3"
unicode:
dependency: transitive
description:
name: unicode
sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
universal_io: universal_io:
dependency: transitive dependency: transitive
description: description:
@ -2470,10 +2342,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.0"
web_socket: web_socket:
dependency: transitive dependency: transitive
description: description:
@ -2510,18 +2382,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: win32_registry name: win32_registry
sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.0" version: "1.1.5"
wkt_parser:
dependency: transitive
description:
name: wkt_parser
sha256: "8a555fc60de3116c00aad67891bcab20f81a958e4219cc106e3c037aa3937f13"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
workmanager: workmanager:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -134,9 +134,6 @@ dependencies:
talker_dio_logger: ^4.6.14 talker_dio_logger: ^4.6.14
talker: ^4.6.14 talker: ^4.6.14
flutter_cache_manager: ^3.4.1 flutter_cache_manager: ^3.4.1
flutter_timezone: ^4.1.0
flutter_map: ^8.1.0
geolocator: ^13.0.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
@ -149,8 +146,8 @@ dev_dependencies:
# rules and activating additional ones. # rules and activating additional ones.
flutter_lints: ^5.0.0 flutter_lints: ^5.0.0
build_runner: ^2.4.15 build_runner: ^2.4.15
freezed: ^3.0.2 freezed: ^3.0.1
json_serializable: ^6.9.4 json_serializable: ^6.8.0
icons_launcher: ^3.0.0 icons_launcher: ^3.0.0
flutter_native_splash: ^2.4.2 flutter_native_splash: ^2.4.2
flutter_launcher_icons: ^0.14.1 flutter_launcher_icons: ^0.14.1

View File

@ -12,11 +12,9 @@
#include <file_selector_windows/file_selector_windows.h> #include <file_selector_windows/file_selector_windows.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h> #include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
#include <flutter_timezone/flutter_timezone_plugin_c_api.h>
#include <flutter_udid/flutter_udid_plugin_c_api.h> #include <flutter_udid/flutter_udid_plugin_c_api.h>
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h> #include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
#include <gal/gal_plugin_c_api.h> #include <gal/gal_plugin_c_api.h>
#include <geolocator_windows/geolocator_windows.h>
#include <hotkey_manager_windows/hotkey_manager_windows_plugin_c_api.h> #include <hotkey_manager_windows/hotkey_manager_windows_plugin_c_api.h>
#include <livekit_client/live_kit_plugin.h> #include <livekit_client/live_kit_plugin.h>
#include <local_notifier/local_notifier_plugin.h> #include <local_notifier/local_notifier_plugin.h>
@ -43,16 +41,12 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar( FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
FlutterTimezonePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterTimezonePluginCApi"));
FlutterUdidPluginCApiRegisterWithRegistrar( FlutterUdidPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterUdidPluginCApi")); registry->GetRegistrarForPlugin("FlutterUdidPluginCApi"));
FlutterWebRTCPluginRegisterWithRegistrar( FlutterWebRTCPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin")); registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
GalPluginCApiRegisterWithRegistrar( GalPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GalPluginCApi")); registry->GetRegistrarForPlugin("GalPluginCApi"));
GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows"));
HotkeyManagerWindowsPluginCApiRegisterWithRegistrar( HotkeyManagerWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("HotkeyManagerWindowsPluginCApi")); registry->GetRegistrarForPlugin("HotkeyManagerWindowsPluginCApi"));
LiveKitPluginRegisterWithRegistrar( LiveKitPluginRegisterWithRegistrar(

View File

@ -9,11 +9,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows file_selector_windows
firebase_core firebase_core
flutter_inappwebview_windows flutter_inappwebview_windows
flutter_timezone
flutter_udid flutter_udid
flutter_webrtc flutter_webrtc
gal gal
geolocator_windows
hotkey_manager_windows hotkey_manager_windows
livekit_client livekit_client
local_notifier local_notifier