upgrade dependency & build runner build

This commit is contained in:
Filip Krawczyk 2021-10-24 23:11:44 +02:00
parent ae235069ba
commit 8703246c65
4 changed files with 17 additions and 40 deletions

View File

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

View File

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

View File

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

View File

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