diff --git a/lib/pages/create_post/create_post_store.dart b/lib/pages/create_post/create_post_store.dart index b0f2e06..f58ee88 100644 --- a/lib/pages/create_post/create_post_store.dart +++ b/lib/pages/create_post/create_post_store.dart @@ -16,6 +16,7 @@ abstract class _CreatePostStore with Store { _CreatePostStore({ required this.instanceHost, this.postToEdit, + // ignore: unused_element this.selectedCommunity, }) : title = postToEdit?.name ?? '', nsfw = postToEdit?.nsfw ?? false, diff --git a/lib/pages/create_post/create_post_store.g.dart b/lib/pages/create_post/create_post_store.g.dart index 6c26729..ae1c743 100644 --- a/lib/pages/create_post/create_post_store.g.dart +++ b/lib/pages/create_post/create_post_store.g.dart @@ -17,7 +17,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { name: '_CreatePostStore.hasUploadedImage')) .value; - final _$showFancyAtom = Atom(name: '_CreatePostStore.showFancy'); + late final _$showFancyAtom = + Atom(name: '_CreatePostStore.showFancy', context: context); @override bool get showFancy { @@ -32,7 +33,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$instanceHostAtom = Atom(name: '_CreatePostStore.instanceHost'); + late final _$instanceHostAtom = + Atom(name: '_CreatePostStore.instanceHost', context: context); @override String get instanceHost { @@ -47,8 +49,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$selectedCommunityAtom = - Atom(name: '_CreatePostStore.selectedCommunity'); + late final _$selectedCommunityAtom = + Atom(name: '_CreatePostStore.selectedCommunity', context: context); @override CommunityView? get selectedCommunity { @@ -63,7 +65,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$urlAtom = Atom(name: '_CreatePostStore.url'); + late final _$urlAtom = Atom(name: '_CreatePostStore.url', context: context); @override String get url { @@ -78,7 +80,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$titleAtom = Atom(name: '_CreatePostStore.title'); + late final _$titleAtom = + Atom(name: '_CreatePostStore.title', context: context); @override String get title { @@ -93,7 +96,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$bodyAtom = Atom(name: '_CreatePostStore.body'); + late final _$bodyAtom = Atom(name: '_CreatePostStore.body', context: context); @override String get body { @@ -108,7 +111,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$nsfwAtom = Atom(name: '_CreatePostStore.nsfw'); + late final _$nsfwAtom = Atom(name: '_CreatePostStore.nsfw', context: context); @override bool get nsfw { @@ -123,14 +126,16 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$submitAsyncAction = AsyncAction('_CreatePostStore.submit'); + late final _$submitAsyncAction = + AsyncAction('_CreatePostStore.submit', context: context); @override Future submit(Jwt token) { return _$submitAsyncAction.run(() => super.submit(token)); } - final _$uploadImageAsyncAction = AsyncAction('_CreatePostStore.uploadImage'); + late final _$uploadImageAsyncAction = + AsyncAction('_CreatePostStore.uploadImage', context: context); @override Future uploadImage(String filePath, Jwt token) { @@ -138,8 +143,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { .run(() => super.uploadImage(filePath, token)); } - final _$_CreatePostStoreActionController = - ActionController(name: '_CreatePostStore'); + late final _$_CreatePostStoreActionController = + ActionController(name: '_CreatePostStore', context: context); @override Future?> searchCommunities( diff --git a/lib/pages/full_post/full_post_store.dart b/lib/pages/full_post/full_post_store.dart index 96cfc71..67caeab 100644 --- a/lib/pages/full_post/full_post_store.dart +++ b/lib/pages/full_post/full_post_store.dart @@ -14,7 +14,6 @@ abstract class _FullPostStore with Store { final String instanceHost; _FullPostStore({ - this.postStore, required this.postId, required this.instanceHost, }); diff --git a/lib/pages/modlog/modlog_page_store.dart b/lib/pages/modlog/modlog_page_store.dart index 840c58e..bd672f4 100644 --- a/lib/pages/modlog/modlog_page_store.dart +++ b/lib/pages/modlog/modlog_page_store.dart @@ -12,6 +12,7 @@ abstract class _ModlogPageStore with Store, DisposableStore { final String instanceHost; final int? communityId; + // ignore: unused_element _ModlogPageStore(this.instanceHost, [this.communityId]) { addReaction(reaction((_) => page, (_) => fetchPage())); } diff --git a/lib/util/async_store.freezed.dart b/lib/util/async_store.freezed.dart index 4df2195..b3a97ea 100644 --- a/lib/util/async_store.freezed.dart +++ b/lib/util/async_store.freezed.dart @@ -86,22 +86,22 @@ class _$AsyncStateCopyWithImpl } /// @nodoc -abstract class $AsyncStateInitialCopyWith { - factory $AsyncStateInitialCopyWith(AsyncStateInitial value, - $Res Function(AsyncStateInitial) then) = - _$AsyncStateInitialCopyWithImpl; +abstract class _$$AsyncStateInitialCopyWith { + factory _$$AsyncStateInitialCopyWith(_$AsyncStateInitial value, + $Res Function(_$AsyncStateInitial) then) = + __$$AsyncStateInitialCopyWithImpl; } /// @nodoc -class _$AsyncStateInitialCopyWithImpl +class __$$AsyncStateInitialCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateInitialCopyWith { - _$AsyncStateInitialCopyWithImpl( - AsyncStateInitial _value, $Res Function(AsyncStateInitial) _then) - : super(_value, (v) => _then(v as AsyncStateInitial)); + implements _$$AsyncStateInitialCopyWith { + __$$AsyncStateInitialCopyWithImpl(_$AsyncStateInitial _value, + $Res Function(_$AsyncStateInitial) _then) + : super(_value, (v) => _then(v as _$AsyncStateInitial)); @override - AsyncStateInitial get _value => super._value as AsyncStateInitial; + _$AsyncStateInitial get _value => super._value as _$AsyncStateInitial; } /// @nodoc @@ -125,7 +125,7 @@ class _$AsyncStateInitial @override bool operator ==(dynamic other) { return identical(this, other) || - (other.runtimeType == runtimeType && other is AsyncStateInitial); + (other.runtimeType == runtimeType && other is _$AsyncStateInitial); } @override @@ -211,30 +211,30 @@ abstract class AsyncStateInitial implements AsyncState { } /// @nodoc -abstract class $AsyncStateDataCopyWith { - factory $AsyncStateDataCopyWith( - AsyncStateData value, $Res Function(AsyncStateData) then) = - _$AsyncStateDataCopyWithImpl; +abstract class _$$AsyncStateDataCopyWith { + factory _$$AsyncStateDataCopyWith( + _$AsyncStateData value, $Res Function(_$AsyncStateData) then) = + __$$AsyncStateDataCopyWithImpl; $Res call({T data, String? errorTerm}); } /// @nodoc -class _$AsyncStateDataCopyWithImpl +class __$$AsyncStateDataCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateDataCopyWith { - _$AsyncStateDataCopyWithImpl( - AsyncStateData _value, $Res Function(AsyncStateData) _then) - : super(_value, (v) => _then(v as AsyncStateData)); + implements _$$AsyncStateDataCopyWith { + __$$AsyncStateDataCopyWithImpl( + _$AsyncStateData _value, $Res Function(_$AsyncStateData) _then) + : super(_value, (v) => _then(v as _$AsyncStateData)); @override - AsyncStateData get _value => super._value as AsyncStateData; + _$AsyncStateData get _value => super._value as _$AsyncStateData; @override $Res call({ Object? data = freezed, Object? errorTerm = freezed, }) { - return _then(AsyncStateData( + return _then(_$AsyncStateData( data == freezed ? _value.data : data // ignore: cast_nullable_to_non_nullable @@ -277,7 +277,7 @@ class _$AsyncStateData bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is AsyncStateData && + other is _$AsyncStateData && const DeepCollectionEquality().equals(other.data, data) && const DeepCollectionEquality().equals(other.errorTerm, errorTerm)); } @@ -290,8 +290,8 @@ class _$AsyncStateData @JsonKey(ignore: true) @override - $AsyncStateDataCopyWith> get copyWith => - _$AsyncStateDataCopyWithImpl>(this, _$identity); + _$$AsyncStateDataCopyWith> get copyWith => + __$$AsyncStateDataCopyWithImpl>(this, _$identity); @override @optionalTypeArgs @@ -375,27 +375,27 @@ abstract class AsyncStateData implements AsyncState { T get data => throw _privateConstructorUsedError; String? get errorTerm => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $AsyncStateDataCopyWith> get copyWith => + _$$AsyncStateDataCopyWith> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $AsyncStateLoadingCopyWith { - factory $AsyncStateLoadingCopyWith(AsyncStateLoading value, - $Res Function(AsyncStateLoading) then) = - _$AsyncStateLoadingCopyWithImpl; +abstract class _$$AsyncStateLoadingCopyWith { + factory _$$AsyncStateLoadingCopyWith(_$AsyncStateLoading value, + $Res Function(_$AsyncStateLoading) then) = + __$$AsyncStateLoadingCopyWithImpl; } /// @nodoc -class _$AsyncStateLoadingCopyWithImpl +class __$$AsyncStateLoadingCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateLoadingCopyWith { - _$AsyncStateLoadingCopyWithImpl( - AsyncStateLoading _value, $Res Function(AsyncStateLoading) _then) - : super(_value, (v) => _then(v as AsyncStateLoading)); + implements _$$AsyncStateLoadingCopyWith { + __$$AsyncStateLoadingCopyWithImpl(_$AsyncStateLoading _value, + $Res Function(_$AsyncStateLoading) _then) + : super(_value, (v) => _then(v as _$AsyncStateLoading)); @override - AsyncStateLoading get _value => super._value as AsyncStateLoading; + _$AsyncStateLoading get _value => super._value as _$AsyncStateLoading; } /// @nodoc @@ -419,7 +419,7 @@ class _$AsyncStateLoading @override bool operator ==(dynamic other) { return identical(this, other) || - (other.runtimeType == runtimeType && other is AsyncStateLoading); + (other.runtimeType == runtimeType && other is _$AsyncStateLoading); } @override @@ -505,29 +505,29 @@ abstract class AsyncStateLoading implements AsyncState { } /// @nodoc -abstract class $AsyncStateErrorCopyWith { - factory $AsyncStateErrorCopyWith( - AsyncStateError value, $Res Function(AsyncStateError) then) = - _$AsyncStateErrorCopyWithImpl; +abstract class _$$AsyncStateErrorCopyWith { + factory _$$AsyncStateErrorCopyWith(_$AsyncStateError value, + $Res Function(_$AsyncStateError) then) = + __$$AsyncStateErrorCopyWithImpl; $Res call({String errorTerm}); } /// @nodoc -class _$AsyncStateErrorCopyWithImpl +class __$$AsyncStateErrorCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateErrorCopyWith { - _$AsyncStateErrorCopyWithImpl( - AsyncStateError _value, $Res Function(AsyncStateError) _then) - : super(_value, (v) => _then(v as AsyncStateError)); + implements _$$AsyncStateErrorCopyWith { + __$$AsyncStateErrorCopyWithImpl( + _$AsyncStateError _value, $Res Function(_$AsyncStateError) _then) + : super(_value, (v) => _then(v as _$AsyncStateError)); @override - AsyncStateError get _value => super._value as AsyncStateError; + _$AsyncStateError get _value => super._value as _$AsyncStateError; @override $Res call({ Object? errorTerm = freezed, }) { - return _then(AsyncStateError( + return _then(_$AsyncStateError( errorTerm == freezed ? _value.errorTerm : errorTerm // ignore: cast_nullable_to_non_nullable @@ -563,7 +563,7 @@ class _$AsyncStateError bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is AsyncStateError && + other is _$AsyncStateError && const DeepCollectionEquality().equals(other.errorTerm, errorTerm)); } @@ -573,8 +573,9 @@ class _$AsyncStateError @JsonKey(ignore: true) @override - $AsyncStateErrorCopyWith> get copyWith => - _$AsyncStateErrorCopyWithImpl>(this, _$identity); + _$$AsyncStateErrorCopyWith> get copyWith => + __$$AsyncStateErrorCopyWithImpl>( + this, _$identity); @override @optionalTypeArgs @@ -656,6 +657,6 @@ abstract class AsyncStateError implements AsyncState { String get errorTerm => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $AsyncStateErrorCopyWith> get copyWith => + _$$AsyncStateErrorCopyWith> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/widgets/comment/comment_store.dart b/lib/widgets/comment/comment_store.dart index f04575a..009f3a2 100644 --- a/lib/widgets/comment/comment_store.dart +++ b/lib/widgets/comment/comment_store.dart @@ -54,6 +54,7 @@ abstract class _CommentStore with Store { _CommentStore( this._accountsStore, { required CommentTree commentTree, + // ignore: unused_element this.userMentionId, required this.depth, required this.canBeMarkedAsRead, diff --git a/pubspec.lock b/pubspec.lock index 4f98c25..ca708ad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "34.0.0" + version: "39.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.0.0" archive: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" async: dependency: transitive description: @@ -70,7 +70,7 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.8" build_runner: dependency: "direct dev" description: @@ -120,13 +120,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" clock: dependency: transitive description: @@ -175,21 +168,21 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.2.3" extended_image: dependency: "direct main" description: name: extended_image url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.2.0" extended_image_library: dependency: transitive description: name: extended_image_library url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.3.0" fake_async: dependency: transitive description: @@ -203,7 +196,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.1" file: dependency: transitive description: @@ -224,7 +217,7 @@ packages: name: fixnum url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" flutter: dependency: "direct main" description: flutter @@ -236,7 +229,7 @@ packages: name: flutter_hooks url: "https://pub.dartlang.org" source: hosted - version: "0.18.3" + version: "0.18.4" flutter_keyboard_visibility: dependency: transitive description: @@ -321,7 +314,7 @@ packages: name: freezed url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.3+1" freezed_annotation: dependency: "direct main" description: @@ -398,7 +391,7 @@ packages: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+2" + version: "0.8.5+3" image_picker_android: dependency: transitive description: @@ -426,7 +419,7 @@ packages: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.4.4" + version: "2.5.0" intl: dependency: "direct main" description: @@ -479,10 +472,10 @@ packages: lemmy_api_client: dependency: "direct main" description: - path: "/home/shilangyu/coding/lemmy_api_client" - relative: false - source: path - version: "0.20.0" + name: lemmy_api_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.21.0" logging: dependency: "direct main" description: @@ -545,7 +538,7 @@ packages: name: mobx_codegen url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.6+1" modal_bottom_sheet: dependency: "direct main" description: @@ -928,7 +921,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" url_launcher: dependency: "direct main" description: @@ -1040,7 +1033,7 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: dart: ">=2.17.0 <3.0.0" flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index f69b76a..b3b3033 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,7 @@ dependencies: # utils timeago: ^3.0.2 fuzzy: ^0.4.0-nullsafety.0 - lemmy_api_client: ^0.20.0 + lemmy_api_client: ^0.21.0 intl: ^0.17.0 matrix4_transform: ^2.0.0 json_annotation: ^4.5.0