Bump mobx

This commit is contained in:
shilangyu 2022-05-13 15:58:01 +02:00
parent 9f588a5ea8
commit 6136e4a408
8 changed files with 94 additions and 93 deletions

View File

@ -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,

View File

@ -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<void> submit(Jwt token) {
return _$submitAsyncAction.run(() => super.submit(token));
}
final _$uploadImageAsyncAction = AsyncAction('_CreatePostStore.uploadImage');
late final _$uploadImageAsyncAction =
AsyncAction('_CreatePostStore.uploadImage', context: context);
@override
Future<void> 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<List<CommunityView>?> searchCommunities(

View File

@ -14,7 +14,6 @@ abstract class _FullPostStore with Store {
final String instanceHost;
_FullPostStore({
this.postStore,
required this.postId,
required this.instanceHost,
});

View File

@ -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()));
}

View File

@ -86,22 +86,22 @@ class _$AsyncStateCopyWithImpl<T, $Res>
}
/// @nodoc
abstract class $AsyncStateInitialCopyWith<T, $Res> {
factory $AsyncStateInitialCopyWith(AsyncStateInitial<T> value,
$Res Function(AsyncStateInitial<T>) then) =
_$AsyncStateInitialCopyWithImpl<T, $Res>;
abstract class _$$AsyncStateInitialCopyWith<T, $Res> {
factory _$$AsyncStateInitialCopyWith(_$AsyncStateInitial<T> value,
$Res Function(_$AsyncStateInitial<T>) then) =
__$$AsyncStateInitialCopyWithImpl<T, $Res>;
}
/// @nodoc
class _$AsyncStateInitialCopyWithImpl<T, $Res>
class __$$AsyncStateInitialCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateInitialCopyWith<T, $Res> {
_$AsyncStateInitialCopyWithImpl(
AsyncStateInitial<T> _value, $Res Function(AsyncStateInitial<T>) _then)
: super(_value, (v) => _then(v as AsyncStateInitial<T>));
implements _$$AsyncStateInitialCopyWith<T, $Res> {
__$$AsyncStateInitialCopyWithImpl(_$AsyncStateInitial<T> _value,
$Res Function(_$AsyncStateInitial<T>) _then)
: super(_value, (v) => _then(v as _$AsyncStateInitial<T>));
@override
AsyncStateInitial<T> get _value => super._value as AsyncStateInitial<T>;
_$AsyncStateInitial<T> get _value => super._value as _$AsyncStateInitial<T>;
}
/// @nodoc
@ -125,7 +125,7 @@ class _$AsyncStateInitial<T>
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is AsyncStateInitial<T>);
(other.runtimeType == runtimeType && other is _$AsyncStateInitial<T>);
}
@override
@ -211,30 +211,30 @@ abstract class AsyncStateInitial<T> implements AsyncState<T> {
}
/// @nodoc
abstract class $AsyncStateDataCopyWith<T, $Res> {
factory $AsyncStateDataCopyWith(
AsyncStateData<T> value, $Res Function(AsyncStateData<T>) then) =
_$AsyncStateDataCopyWithImpl<T, $Res>;
abstract class _$$AsyncStateDataCopyWith<T, $Res> {
factory _$$AsyncStateDataCopyWith(
_$AsyncStateData<T> value, $Res Function(_$AsyncStateData<T>) then) =
__$$AsyncStateDataCopyWithImpl<T, $Res>;
$Res call({T data, String? errorTerm});
}
/// @nodoc
class _$AsyncStateDataCopyWithImpl<T, $Res>
class __$$AsyncStateDataCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateDataCopyWith<T, $Res> {
_$AsyncStateDataCopyWithImpl(
AsyncStateData<T> _value, $Res Function(AsyncStateData<T>) _then)
: super(_value, (v) => _then(v as AsyncStateData<T>));
implements _$$AsyncStateDataCopyWith<T, $Res> {
__$$AsyncStateDataCopyWithImpl(
_$AsyncStateData<T> _value, $Res Function(_$AsyncStateData<T>) _then)
: super(_value, (v) => _then(v as _$AsyncStateData<T>));
@override
AsyncStateData<T> get _value => super._value as AsyncStateData<T>;
_$AsyncStateData<T> get _value => super._value as _$AsyncStateData<T>;
@override
$Res call({
Object? data = freezed,
Object? errorTerm = freezed,
}) {
return _then(AsyncStateData<T>(
return _then(_$AsyncStateData<T>(
data == freezed
? _value.data
: data // ignore: cast_nullable_to_non_nullable
@ -277,7 +277,7 @@ class _$AsyncStateData<T>
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is AsyncStateData<T> &&
other is _$AsyncStateData<T> &&
const DeepCollectionEquality().equals(other.data, data) &&
const DeepCollectionEquality().equals(other.errorTerm, errorTerm));
}
@ -290,8 +290,8 @@ class _$AsyncStateData<T>
@JsonKey(ignore: true)
@override
$AsyncStateDataCopyWith<T, AsyncStateData<T>> get copyWith =>
_$AsyncStateDataCopyWithImpl<T, AsyncStateData<T>>(this, _$identity);
_$$AsyncStateDataCopyWith<T, _$AsyncStateData<T>> get copyWith =>
__$$AsyncStateDataCopyWithImpl<T, _$AsyncStateData<T>>(this, _$identity);
@override
@optionalTypeArgs
@ -375,27 +375,27 @@ abstract class AsyncStateData<T> implements AsyncState<T> {
T get data => throw _privateConstructorUsedError;
String? get errorTerm => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$AsyncStateDataCopyWith<T, AsyncStateData<T>> get copyWith =>
_$$AsyncStateDataCopyWith<T, _$AsyncStateData<T>> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AsyncStateLoadingCopyWith<T, $Res> {
factory $AsyncStateLoadingCopyWith(AsyncStateLoading<T> value,
$Res Function(AsyncStateLoading<T>) then) =
_$AsyncStateLoadingCopyWithImpl<T, $Res>;
abstract class _$$AsyncStateLoadingCopyWith<T, $Res> {
factory _$$AsyncStateLoadingCopyWith(_$AsyncStateLoading<T> value,
$Res Function(_$AsyncStateLoading<T>) then) =
__$$AsyncStateLoadingCopyWithImpl<T, $Res>;
}
/// @nodoc
class _$AsyncStateLoadingCopyWithImpl<T, $Res>
class __$$AsyncStateLoadingCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateLoadingCopyWith<T, $Res> {
_$AsyncStateLoadingCopyWithImpl(
AsyncStateLoading<T> _value, $Res Function(AsyncStateLoading<T>) _then)
: super(_value, (v) => _then(v as AsyncStateLoading<T>));
implements _$$AsyncStateLoadingCopyWith<T, $Res> {
__$$AsyncStateLoadingCopyWithImpl(_$AsyncStateLoading<T> _value,
$Res Function(_$AsyncStateLoading<T>) _then)
: super(_value, (v) => _then(v as _$AsyncStateLoading<T>));
@override
AsyncStateLoading<T> get _value => super._value as AsyncStateLoading<T>;
_$AsyncStateLoading<T> get _value => super._value as _$AsyncStateLoading<T>;
}
/// @nodoc
@ -419,7 +419,7 @@ class _$AsyncStateLoading<T>
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is AsyncStateLoading<T>);
(other.runtimeType == runtimeType && other is _$AsyncStateLoading<T>);
}
@override
@ -505,29 +505,29 @@ abstract class AsyncStateLoading<T> implements AsyncState<T> {
}
/// @nodoc
abstract class $AsyncStateErrorCopyWith<T, $Res> {
factory $AsyncStateErrorCopyWith(
AsyncStateError<T> value, $Res Function(AsyncStateError<T>) then) =
_$AsyncStateErrorCopyWithImpl<T, $Res>;
abstract class _$$AsyncStateErrorCopyWith<T, $Res> {
factory _$$AsyncStateErrorCopyWith(_$AsyncStateError<T> value,
$Res Function(_$AsyncStateError<T>) then) =
__$$AsyncStateErrorCopyWithImpl<T, $Res>;
$Res call({String errorTerm});
}
/// @nodoc
class _$AsyncStateErrorCopyWithImpl<T, $Res>
class __$$AsyncStateErrorCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateErrorCopyWith<T, $Res> {
_$AsyncStateErrorCopyWithImpl(
AsyncStateError<T> _value, $Res Function(AsyncStateError<T>) _then)
: super(_value, (v) => _then(v as AsyncStateError<T>));
implements _$$AsyncStateErrorCopyWith<T, $Res> {
__$$AsyncStateErrorCopyWithImpl(
_$AsyncStateError<T> _value, $Res Function(_$AsyncStateError<T>) _then)
: super(_value, (v) => _then(v as _$AsyncStateError<T>));
@override
AsyncStateError<T> get _value => super._value as AsyncStateError<T>;
_$AsyncStateError<T> get _value => super._value as _$AsyncStateError<T>;
@override
$Res call({
Object? errorTerm = freezed,
}) {
return _then(AsyncStateError<T>(
return _then(_$AsyncStateError<T>(
errorTerm == freezed
? _value.errorTerm
: errorTerm // ignore: cast_nullable_to_non_nullable
@ -563,7 +563,7 @@ class _$AsyncStateError<T>
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is AsyncStateError<T> &&
other is _$AsyncStateError<T> &&
const DeepCollectionEquality().equals(other.errorTerm, errorTerm));
}
@ -573,8 +573,9 @@ class _$AsyncStateError<T>
@JsonKey(ignore: true)
@override
$AsyncStateErrorCopyWith<T, AsyncStateError<T>> get copyWith =>
_$AsyncStateErrorCopyWithImpl<T, AsyncStateError<T>>(this, _$identity);
_$$AsyncStateErrorCopyWith<T, _$AsyncStateError<T>> get copyWith =>
__$$AsyncStateErrorCopyWithImpl<T, _$AsyncStateError<T>>(
this, _$identity);
@override
@optionalTypeArgs
@ -656,6 +657,6 @@ abstract class AsyncStateError<T> implements AsyncState<T> {
String get errorTerm => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$AsyncStateErrorCopyWith<T, AsyncStateError<T>> get copyWith =>
_$$AsyncStateErrorCopyWith<T, _$AsyncStateError<T>> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -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,

View File

@ -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"

View File

@ -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