upgrade dependency & build runner build
This commit is contained in:
parent
ae235069ba
commit
8703246c65
|
@ -7,8 +7,8 @@ part of 'config_store.dart';
|
|||
// **************************************************************************
|
||||
|
||||
ConfigStore _$ConfigStoreFromJson(Map<String, dynamic> json) => ConfigStore()
|
||||
..theme = _$enumDecodeNullable(_$ThemeModeEnumMap, json['theme']) ??
|
||||
ThemeMode.system
|
||||
..theme =
|
||||
$enumDecodeNullable(_$ThemeModeEnumMap, json['theme']) ?? ThemeMode.system
|
||||
..amoledDarkMode = json['amoledDarkMode'] as bool? ?? false
|
||||
..locale = LocaleSerde.fromJson(json['locale'] as String?)
|
||||
..showAvatars = json['showAvatars'] as bool? ?? true
|
||||
|
@ -28,43 +28,6 @@ Map<String, dynamic> _$ConfigStoreToJson(ConfigStore instance) =>
|
|||
'defaultListingType': instance.defaultListingType,
|
||||
};
|
||||
|
||||
K _$enumDecode<K, V>(
|
||||
Map<K, V> enumValues,
|
||||
Object? source, {
|
||||
K? unknownValue,
|
||||
}) {
|
||||
if (source == null) {
|
||||
throw ArgumentError(
|
||||
'A value must be provided. Supported values: '
|
||||
'${enumValues.values.join(', ')}',
|
||||
);
|
||||
}
|
||||
|
||||
return enumValues.entries.singleWhere(
|
||||
(e) => e.value == source,
|
||||
orElse: () {
|
||||
if (unknownValue == null) {
|
||||
throw ArgumentError(
|
||||
'`$source` is not one of the supported values: '
|
||||
'${enumValues.values.join(', ')}',
|
||||
);
|
||||
}
|
||||
return MapEntry(unknownValue, enumValues.values.first);
|
||||
},
|
||||
).key;
|
||||
}
|
||||
|
||||
K? _$enumDecodeNullable<K, V>(
|
||||
Map<K, V> enumValues,
|
||||
dynamic source, {
|
||||
K? unknownValue,
|
||||
}) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
return _$enumDecode<K, V>(enumValues, source, unknownValue: unknownValue);
|
||||
}
|
||||
|
||||
const _$ThemeModeEnumMap = {
|
||||
ThemeMode.system: 'system',
|
||||
ThemeMode.light: 'light',
|
||||
|
|
|
@ -88,6 +88,13 @@ mixin _$CommentStore on _CommentStore, Store {
|
|||
});
|
||||
}
|
||||
|
||||
final _$reportAsyncAction = AsyncAction('_CommentStore.report');
|
||||
|
||||
@override
|
||||
Future<void> report(Jwt token, String reason) {
|
||||
return _$reportAsyncAction.run(() => super.report(token, reason));
|
||||
}
|
||||
|
||||
final _$deleteAsyncAction = AsyncAction('_CommentStore.delete');
|
||||
|
||||
@override
|
||||
|
|
|
@ -45,6 +45,13 @@ mixin _$PostStore on _PostStore, Store {
|
|||
return _$saveAsyncAction.run(() => super.save(token));
|
||||
}
|
||||
|
||||
final _$reportAsyncAction = AsyncAction('_PostStore.report');
|
||||
|
||||
@override
|
||||
Future<void> report(Jwt token, String reason) {
|
||||
return _$reportAsyncAction.run(() => super.report(token, reason));
|
||||
}
|
||||
|
||||
final _$blockUserAsyncAction = AsyncAction('_PostStore.blockUser');
|
||||
|
||||
@override
|
||||
|
|
|
@ -52,7 +52,7 @@ dependencies:
|
|||
lemmy_api_client: ^0.17.0
|
||||
intl: ^0.17.0
|
||||
matrix4_transform: ^2.0.0
|
||||
json_annotation: ^4.1.0
|
||||
json_annotation: ^4.3.0
|
||||
keyboard_dismisser: ^2.0.0
|
||||
freezed_annotation: ^0.15.0
|
||||
logging: ^1.0.1
|
||||
|
|
Loading…
Reference in New Issue