🎨 Fix most of linting notes
This commit is contained in:
parent
7656c08832
commit
ee7d0ddd25
@ -217,15 +217,17 @@ class SnAttachmentProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<SnAttachment> updateOne(
|
Future<SnAttachment> updateOne(
|
||||||
int id,
|
int id, {
|
||||||
String alt, {
|
String? alt,
|
||||||
required Map<String, dynamic> metadata,
|
String? thumbnail,
|
||||||
bool isMature = false,
|
Map<String, dynamic>? metadata,
|
||||||
|
bool? isIndexable,
|
||||||
}) async {
|
}) async {
|
||||||
final resp = await _sn.client.put('/cgi/uc/attachments/$id', data: {
|
final resp = await _sn.client.put('/cgi/uc/attachments/$id', data: {
|
||||||
'alt': alt,
|
'alt': alt,
|
||||||
|
'thumbnail': thumbnail,
|
||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
'is_mature': isMature,
|
'is_indexable': isIndexable,
|
||||||
});
|
});
|
||||||
return SnAttachment.fromJson(resp.data);
|
return SnAttachment.fromJson(resp.data);
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,14 @@ import 'package:surface/widgets/universal_image.dart';
|
|||||||
|
|
||||||
class AccountPublisherEditScreen extends StatefulWidget {
|
class AccountPublisherEditScreen extends StatefulWidget {
|
||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
const AccountPublisherEditScreen({super.key, required this.name});
|
const AccountPublisherEditScreen({super.key, required this.name});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AccountPublisherEditScreen> createState() =>
|
State<AccountPublisherEditScreen> createState() => _AccountPublisherEditScreenState();
|
||||||
_AccountPublisherEditScreenState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AccountPublisherEditScreenState
|
class _AccountPublisherEditScreenState extends State<AccountPublisherEditScreen> {
|
||||||
extends State<AccountPublisherEditScreen> {
|
|
||||||
bool _isBusy = false;
|
bool _isBusy = false;
|
||||||
|
|
||||||
SnPublisher? _publisher;
|
SnPublisher? _publisher;
|
||||||
@ -54,7 +53,7 @@ class _AccountPublisherEditScreenState
|
|||||||
_publisher = SnPublisher.fromJson(resp.data);
|
_publisher = SnPublisher.fromJson(resp.data);
|
||||||
_syncWidget();
|
_syncWidget();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
context.showErrorDialog(err);
|
if (mounted) context.showErrorDialog(err);
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isBusy = false);
|
setState(() => _isBusy = false);
|
||||||
}
|
}
|
||||||
@ -75,9 +74,9 @@ class _AccountPublisherEditScreenState
|
|||||||
'name': _nameController.text,
|
'name': _nameController.text,
|
||||||
'description': _descriptionController.text,
|
'description': _descriptionController.text,
|
||||||
});
|
});
|
||||||
Navigator.pop(context, true);
|
if (mounted) Navigator.pop(context, true);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
context.showErrorDialog(err);
|
if(mounted) context.showErrorDialog(err);
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isBusy = false);
|
setState(() => _isBusy = false);
|
||||||
}
|
}
|
||||||
@ -108,11 +107,9 @@ class _AccountPublisherEditScreenState
|
|||||||
if (image == null) return;
|
if (image == null) return;
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
|
||||||
final ImageProvider imageProvider =
|
final ImageProvider imageProvider = kIsWeb ? NetworkImage(image.path) : FileImage(File(image.path));
|
||||||
kIsWeb ? NetworkImage(image.path) : FileImage(File(image.path));
|
final aspectRatios =
|
||||||
final aspectRatios = place == 'banner'
|
place == 'banner' ? [CropAspectRatio(width: 16, height: 7)] : [CropAspectRatio(width: 1, height: 1)];
|
||||||
? [CropAspectRatio(width: 16, height: 7)]
|
|
||||||
: [CropAspectRatio(width: 1, height: 1)];
|
|
||||||
final result = (!kIsWeb && (Platform.isIOS || Platform.isMacOS))
|
final result = (!kIsWeb && (Platform.isIOS || Platform.isMacOS))
|
||||||
? await showCupertinoImageCropper(
|
? await showCupertinoImageCropper(
|
||||||
// ignore: use_build_context_synchronously
|
// ignore: use_build_context_synchronously
|
||||||
@ -134,10 +131,7 @@ class _AccountPublisherEditScreenState
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final rawBytes =
|
final rawBytes = (await result.uiImage.toByteData(format: ImageByteFormat.png))!.buffer.asUint8List();
|
||||||
(await result.uiImage.toByteData(format: ImageByteFormat.png))!
|
|
||||||
.buffer
|
|
||||||
.asUint8List();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final attachment = await attach.directUploadOne(
|
final attachment = await attach.directUploadOne(
|
||||||
@ -199,9 +193,7 @@ class _AccountPublisherEditScreenState
|
|||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 16 / 9,
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||||
.colorScheme
|
|
||||||
.surfaceContainerHigh,
|
|
||||||
child: _banner != null
|
child: _banner != null
|
||||||
? AutoResizeUniversalImage(
|
? AutoResizeUniversalImage(
|
||||||
sn.getAttachmentUrl(_banner!),
|
sn.getAttachmentUrl(_banner!),
|
||||||
@ -240,8 +232,7 @@ class _AccountPublisherEditScreenState
|
|||||||
labelText: 'fieldUsername'.tr(),
|
labelText: 'fieldUsername'.tr(),
|
||||||
helperText: 'fieldUsernameCannotEditHint'.tr(),
|
helperText: 'fieldUsernameCannotEditHint'.tr(),
|
||||||
),
|
),
|
||||||
onTapOutside: (_) =>
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
FocusManager.instance.primaryFocus?.unfocus(),
|
|
||||||
),
|
),
|
||||||
const Gap(4),
|
const Gap(4),
|
||||||
TextField(
|
TextField(
|
||||||
@ -249,8 +240,7 @@ class _AccountPublisherEditScreenState
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'fieldNickname'.tr(),
|
labelText: 'fieldNickname'.tr(),
|
||||||
),
|
),
|
||||||
onTapOutside: (_) =>
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
FocusManager.instance.primaryFocus?.unfocus(),
|
|
||||||
),
|
),
|
||||||
const Gap(4),
|
const Gap(4),
|
||||||
TextField(
|
TextField(
|
||||||
@ -260,8 +250,7 @@ class _AccountPublisherEditScreenState
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'fieldDescription'.tr(),
|
labelText: 'fieldDescription'.tr(),
|
||||||
),
|
),
|
||||||
onTapOutside: (_) =>
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
FocusManager.instance.primaryFocus?.unfocus(),
|
|
||||||
),
|
),
|
||||||
const Gap(12),
|
const Gap(12),
|
||||||
Row(
|
Row(
|
||||||
|
@ -201,7 +201,7 @@ class _PublisherNewPersonalState extends State<_PublisherNewPersonal> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _PublisherNewOrganization extends StatefulWidget {
|
class _PublisherNewOrganization extends StatefulWidget {
|
||||||
const _PublisherNewOrganization({super.key});
|
const _PublisherNewOrganization();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_PublisherNewOrganization> createState() =>
|
State<_PublisherNewOrganization> createState() =>
|
||||||
|
@ -105,6 +105,7 @@ class _LoginCheckScreen extends StatefulWidget {
|
|||||||
final SnAuthFactor? factor;
|
final SnAuthFactor? factor;
|
||||||
final Function(SnAuthTicket?) onTicket;
|
final Function(SnAuthTicket?) onTicket;
|
||||||
final Function onNext;
|
final Function onNext;
|
||||||
|
|
||||||
const _LoginCheckScreen({
|
const _LoginCheckScreen({
|
||||||
super.key,
|
super.key,
|
||||||
required this.ticket,
|
required this.ticket,
|
||||||
@ -204,9 +205,7 @@ class _LoginCheckScreenState extends State<_LoginCheckScreen> {
|
|||||||
controller: _passwordController,
|
controller: _passwordController,
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
autofillHints: [
|
autofillHints: [
|
||||||
(_factorLabelMap[widget.factor!.type]?.$3 ?? true)
|
(_factorLabelMap[widget.factor!.type]?.$3 ?? true) ? AutofillHints.password : AutofillHints.oneTimeCode
|
||||||
? AutofillHints.password
|
|
||||||
: AutofillHints.oneTimeCode
|
|
||||||
],
|
],
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
@ -243,6 +242,7 @@ class _LoginPickerScreen extends StatefulWidget {
|
|||||||
final Function(SnAuthTicket?) onTicket;
|
final Function(SnAuthTicket?) onTicket;
|
||||||
final Function(SnAuthFactor) onPickFactor;
|
final Function(SnAuthFactor) onPickFactor;
|
||||||
final Function onNext;
|
final Function onNext;
|
||||||
|
|
||||||
const _LoginPickerScreen({
|
const _LoginPickerScreen({
|
||||||
super.key,
|
super.key,
|
||||||
required this.ticket,
|
required this.ticket,
|
||||||
@ -260,8 +260,7 @@ class _LoginPickerScreenState extends State<_LoginPickerScreen> {
|
|||||||
bool _isBusy = false;
|
bool _isBusy = false;
|
||||||
int? _factorPicked;
|
int? _factorPicked;
|
||||||
|
|
||||||
Color get _unFocusColor =>
|
Color get _unFocusColor => Theme.of(context).colorScheme.onSurface.withAlpha((255 * 0.75).round());
|
||||||
Theme.of(context).colorScheme.onSurface.withAlpha((255 * 0.75).round());
|
|
||||||
|
|
||||||
void _performGetFactorCode() async {
|
void _performGetFactorCode() async {
|
||||||
if (_factorPicked == null) return;
|
if (_factorPicked == null) return;
|
||||||
@ -373,6 +372,7 @@ class _LoginLookupScreen extends StatefulWidget {
|
|||||||
final Function(SnAuthTicket?) onTicket;
|
final Function(SnAuthTicket?) onTicket;
|
||||||
final Function(List<SnAuthFactor>?) onFactor;
|
final Function(List<SnAuthFactor>?) onFactor;
|
||||||
final Function onNext;
|
final Function onNext;
|
||||||
|
|
||||||
const _LoginLookupScreen({
|
const _LoginLookupScreen({
|
||||||
super.key,
|
super.key,
|
||||||
required this.ticket,
|
required this.ticket,
|
||||||
@ -401,14 +401,13 @@ class _LoginLookupScreenState extends State<_LoginLookupScreen> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
final sn = context.read<SnNetworkProvider>();
|
final sn = context.read<SnNetworkProvider>();
|
||||||
final lookupResp =
|
final lookupResp = await sn.client.get('/cgi/id/users/lookup?probe=$username');
|
||||||
await sn.client.get('/cgi/id/users/lookup?probe=$username');
|
|
||||||
await sn.client.post('/cgi/id/users/me/password-reset', data: {
|
await sn.client.post('/cgi/id/users/me/password-reset', data: {
|
||||||
'user_id': lookupResp.data['id'],
|
'user_id': lookupResp.data['id'],
|
||||||
});
|
});
|
||||||
context.showModalDialog('done'.tr(), 'signinResetPasswordSent'.tr());
|
if (mounted) context.showModalDialog('done'.tr(), 'signinResetPasswordSent'.tr());
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
context.showErrorDialog(err);
|
if (mounted) context.showErrorDialog(err);
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isBusy = false);
|
setState(() => _isBusy = false);
|
||||||
}
|
}
|
||||||
@ -431,8 +430,7 @@ class _LoginLookupScreenState extends State<_LoginLookupScreen> {
|
|||||||
widget.onTicket(result.ticket);
|
widget.onTicket(result.ticket);
|
||||||
|
|
||||||
// Pull factors
|
// Pull factors
|
||||||
final factorResp =
|
final factorResp = await sn.client.get('/cgi/id/auth/factors', queryParameters: {
|
||||||
await sn.client.get('/cgi/id/auth/factors', queryParameters: {
|
|
||||||
'ticketId': result.ticket!.id.toString(),
|
'ticketId': result.ticket!.id.toString(),
|
||||||
});
|
});
|
||||||
widget.onFactor(
|
widget.onFactor(
|
||||||
@ -443,7 +441,7 @@ class _LoginLookupScreenState extends State<_LoginLookupScreen> {
|
|||||||
|
|
||||||
widget.onNext();
|
widget.onNext();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
context.showErrorDialog(err);
|
if(mounted) context.showErrorDialog(err);
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isBusy = false);
|
setState(() => _isBusy = false);
|
||||||
@ -526,10 +524,7 @@ class _LoginLookupScreenState extends State<_LoginLookupScreen> {
|
|||||||
'termAcceptNextWithAgree'.tr(),
|
'termAcceptNextWithAgree'.tr(),
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).colorScheme.onSurface.withAlpha((255 * 0.75).round()),
|
||||||
.colorScheme
|
|
||||||
.onSurface
|
|
||||||
.withAlpha((255 * 0.75).round()),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Material(
|
Material(
|
||||||
|
@ -443,7 +443,7 @@ class _ChannelProfileDetailDialogState
|
|||||||
|
|
||||||
class _ChannelMemberListWidget extends StatefulWidget {
|
class _ChannelMemberListWidget extends StatefulWidget {
|
||||||
final SnChannel channel;
|
final SnChannel channel;
|
||||||
const _ChannelMemberListWidget({super.key, required this.channel});
|
const _ChannelMemberListWidget({required this.channel});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_ChannelMemberListWidget> createState() =>
|
State<_ChannelMemberListWidget> createState() =>
|
||||||
@ -580,7 +580,7 @@ class _ChannelMemberListWidgetState extends State<_ChannelMemberListWidget> {
|
|||||||
|
|
||||||
class _NewChannelMemberWidget extends StatefulWidget {
|
class _NewChannelMemberWidget extends StatefulWidget {
|
||||||
final SnChannel channel;
|
final SnChannel channel;
|
||||||
const _NewChannelMemberWidget({super.key, required this.channel});
|
const _NewChannelMemberWidget({required this.channel});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_NewChannelMemberWidget> createState() =>
|
State<_NewChannelMemberWidget> createState() =>
|
||||||
|
@ -97,7 +97,6 @@ class _ChatRoomScreenState extends State<ChatRoomScreen> {
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
print((err as DioException).response?.data);
|
|
||||||
context.showErrorDialog(err);
|
context.showErrorDialog(err);
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isCalling = false);
|
setState(() => _isCalling = false);
|
||||||
|
@ -289,7 +289,7 @@ class _FriendScreenState extends State<FriendScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _NewFriendWidget extends StatefulWidget {
|
class _NewFriendWidget extends StatefulWidget {
|
||||||
const _NewFriendWidget({super.key});
|
const _NewFriendWidget();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_NewFriendWidget> createState() => _NewFriendWidgetState();
|
State<_NewFriendWidget> createState() => _NewFriendWidgetState();
|
||||||
@ -365,7 +365,7 @@ class _NewFriendWidgetState extends State<_NewFriendWidget> {
|
|||||||
|
|
||||||
class _FriendshipListWidget extends StatefulWidget {
|
class _FriendshipListWidget extends StatefulWidget {
|
||||||
final List<SnRelationship> relations;
|
final List<SnRelationship> relations;
|
||||||
const _FriendshipListWidget({super.key, required this.relations});
|
const _FriendshipListWidget({required this.relations});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_FriendshipListWidget> createState() => _FriendshipListWidgetState();
|
State<_FriendshipListWidget> createState() => _FriendshipListWidgetState();
|
||||||
|
@ -109,7 +109,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
class _HomeDashUpdateWidget extends StatelessWidget {
|
class _HomeDashUpdateWidget extends StatelessWidget {
|
||||||
final EdgeInsets? padding;
|
final EdgeInsets? padding;
|
||||||
|
|
||||||
const _HomeDashUpdateWidget({super.key, this.padding});
|
const _HomeDashUpdateWidget({this.padding});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -153,7 +153,7 @@ class _HomeDashUpdateWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HomeDashSpecialDayWidget extends StatelessWidget {
|
class _HomeDashSpecialDayWidget extends StatelessWidget {
|
||||||
const _HomeDashSpecialDayWidget({super.key});
|
const _HomeDashSpecialDayWidget();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -215,7 +215,7 @@ class _HomeDashSpecialDayWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HomeDashCheckInWidget extends StatefulWidget {
|
class _HomeDashCheckInWidget extends StatefulWidget {
|
||||||
const _HomeDashCheckInWidget({super.key});
|
const _HomeDashCheckInWidget();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_HomeDashCheckInWidget> createState() => _HomeDashCheckInWidgetState();
|
State<_HomeDashCheckInWidget> createState() => _HomeDashCheckInWidgetState();
|
||||||
@ -433,7 +433,7 @@ class _HomeDashCheckInWidgetState extends State<_HomeDashCheckInWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HomeDashNotificationWidget extends StatefulWidget {
|
class _HomeDashNotificationWidget extends StatefulWidget {
|
||||||
const _HomeDashNotificationWidget({super.key});
|
const _HomeDashNotificationWidget();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_HomeDashNotificationWidget> createState() => _HomeDashNotificationWidgetState();
|
State<_HomeDashNotificationWidget> createState() => _HomeDashNotificationWidgetState();
|
||||||
@ -504,7 +504,7 @@ class _HomeDashNotificationWidgetState extends State<_HomeDashNotificationWidget
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HomeDashRecommendationPostWidget extends StatefulWidget {
|
class _HomeDashRecommendationPostWidget extends StatefulWidget {
|
||||||
const _HomeDashRecommendationPostWidget({super.key});
|
const _HomeDashRecommendationPostWidget();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_HomeDashRecommendationPostWidget> createState() => _HomeDashRecommendationPostWidgetState();
|
State<_HomeDashRecommendationPostWidget> createState() => _HomeDashRecommendationPostWidgetState();
|
||||||
|
@ -580,7 +580,6 @@ class _PublisherPostList extends StatelessWidget {
|
|||||||
final void Function() onDeleted;
|
final void Function() onDeleted;
|
||||||
|
|
||||||
const _PublisherPostList({
|
const _PublisherPostList({
|
||||||
super.key,
|
|
||||||
required this.isBusy,
|
required this.isBusy,
|
||||||
required this.postCount,
|
required this.postCount,
|
||||||
required this.posts,
|
required this.posts,
|
||||||
|
@ -119,7 +119,7 @@ class _RealmDetailHomeWidget extends StatelessWidget {
|
|||||||
final SnRealm? realm;
|
final SnRealm? realm;
|
||||||
final List<SnPublisher>? publishers;
|
final List<SnPublisher>? publishers;
|
||||||
|
|
||||||
const _RealmDetailHomeWidget({super.key, required this.realm, this.publishers});
|
const _RealmDetailHomeWidget({required this.realm, this.publishers});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -175,7 +175,7 @@ class _RealmDetailHomeWidget extends StatelessWidget {
|
|||||||
class _RealmMemberListWidget extends StatefulWidget {
|
class _RealmMemberListWidget extends StatefulWidget {
|
||||||
final SnRealm? realm;
|
final SnRealm? realm;
|
||||||
|
|
||||||
const _RealmMemberListWidget({super.key, this.realm});
|
const _RealmMemberListWidget({this.realm});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_RealmMemberListWidget> createState() => _RealmMemberListWidgetState();
|
State<_RealmMemberListWidget> createState() => _RealmMemberListWidgetState();
|
||||||
@ -304,7 +304,7 @@ class _RealmMemberListWidgetState extends State<_RealmMemberListWidget> {
|
|||||||
class _NewRealmMemberWidget extends StatefulWidget {
|
class _NewRealmMemberWidget extends StatefulWidget {
|
||||||
final SnRealm realm;
|
final SnRealm realm;
|
||||||
|
|
||||||
const _NewRealmMemberWidget({super.key, required this.realm});
|
const _NewRealmMemberWidget({required this.realm});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_NewRealmMemberWidget> createState() => _NewRealmMemberWidgetState();
|
State<_NewRealmMemberWidget> createState() => _NewRealmMemberWidgetState();
|
||||||
@ -384,7 +384,7 @@ class _RealmSettingsWidget extends StatefulWidget {
|
|||||||
final SnRealm? realm;
|
final SnRealm? realm;
|
||||||
final Function() onUpdate;
|
final Function() onUpdate;
|
||||||
|
|
||||||
const _RealmSettingsWidget({super.key, required this.realm, required this.onUpdate});
|
const _RealmSettingsWidget({required this.realm, required this.onUpdate});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_RealmSettingsWidget> createState() => _RealmSettingsWidgetState();
|
State<_RealmSettingsWidget> createState() => _RealmSettingsWidgetState();
|
||||||
|
@ -43,6 +43,7 @@ class SnAttachment with _$SnAttachment {
|
|||||||
required int accountId,
|
required int accountId,
|
||||||
@Default({}) Map<String, dynamic> usermeta,
|
@Default({}) Map<String, dynamic> usermeta,
|
||||||
@Default({}) Map<String, dynamic> metadata,
|
@Default({}) Map<String, dynamic> metadata,
|
||||||
|
String? thumbnail,
|
||||||
}) = _SnAttachment;
|
}) = _SnAttachment;
|
||||||
|
|
||||||
factory SnAttachment.fromJson(Map<String, Object?> json) => _$SnAttachmentFromJson(json);
|
factory SnAttachment.fromJson(Map<String, Object?> json) => _$SnAttachmentFromJson(json);
|
||||||
|
@ -47,6 +47,7 @@ mixin _$SnAttachment {
|
|||||||
int get accountId => throw _privateConstructorUsedError;
|
int get accountId => throw _privateConstructorUsedError;
|
||||||
Map<String, dynamic> get usermeta => throw _privateConstructorUsedError;
|
Map<String, dynamic> get usermeta => throw _privateConstructorUsedError;
|
||||||
Map<String, dynamic> get metadata => throw _privateConstructorUsedError;
|
Map<String, dynamic> get metadata => throw _privateConstructorUsedError;
|
||||||
|
String? get thumbnail => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
/// Serializes this SnAttachment to a JSON map.
|
/// Serializes this SnAttachment to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@ -91,7 +92,8 @@ abstract class $SnAttachmentCopyWith<$Res> {
|
|||||||
int poolId,
|
int poolId,
|
||||||
int accountId,
|
int accountId,
|
||||||
Map<String, dynamic> usermeta,
|
Map<String, dynamic> usermeta,
|
||||||
Map<String, dynamic> metadata});
|
Map<String, dynamic> metadata,
|
||||||
|
String? thumbnail});
|
||||||
|
|
||||||
$SnAttachmentPoolCopyWith<$Res>? get pool;
|
$SnAttachmentPoolCopyWith<$Res>? get pool;
|
||||||
}
|
}
|
||||||
@ -138,6 +140,7 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment>
|
|||||||
Object? accountId = null,
|
Object? accountId = null,
|
||||||
Object? usermeta = null,
|
Object? usermeta = null,
|
||||||
Object? metadata = null,
|
Object? metadata = null,
|
||||||
|
Object? thumbnail = freezed,
|
||||||
}) {
|
}) {
|
||||||
return _then(_value.copyWith(
|
return _then(_value.copyWith(
|
||||||
id: null == id
|
id: null == id
|
||||||
@ -248,6 +251,10 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment>
|
|||||||
? _value.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>,
|
||||||
|
thumbnail: freezed == thumbnail
|
||||||
|
? _value.thumbnail
|
||||||
|
: thumbnail // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +308,8 @@ abstract class _$$SnAttachmentImplCopyWith<$Res>
|
|||||||
int poolId,
|
int poolId,
|
||||||
int accountId,
|
int accountId,
|
||||||
Map<String, dynamic> usermeta,
|
Map<String, dynamic> usermeta,
|
||||||
Map<String, dynamic> metadata});
|
Map<String, dynamic> metadata,
|
||||||
|
String? thumbnail});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
$SnAttachmentPoolCopyWith<$Res>? get pool;
|
$SnAttachmentPoolCopyWith<$Res>? get pool;
|
||||||
@ -347,6 +355,7 @@ class __$$SnAttachmentImplCopyWithImpl<$Res>
|
|||||||
Object? accountId = null,
|
Object? accountId = null,
|
||||||
Object? usermeta = null,
|
Object? usermeta = null,
|
||||||
Object? metadata = null,
|
Object? metadata = null,
|
||||||
|
Object? thumbnail = freezed,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$SnAttachmentImpl(
|
return _then(_$SnAttachmentImpl(
|
||||||
id: null == id
|
id: null == id
|
||||||
@ -457,6 +466,10 @@ class __$$SnAttachmentImplCopyWithImpl<$Res>
|
|||||||
? _value._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>,
|
||||||
|
thumbnail: freezed == thumbnail
|
||||||
|
? _value.thumbnail
|
||||||
|
: thumbnail // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -491,7 +504,8 @@ class _$SnAttachmentImpl extends _SnAttachment {
|
|||||||
required this.poolId,
|
required this.poolId,
|
||||||
required this.accountId,
|
required this.accountId,
|
||||||
final Map<String, dynamic> usermeta = const {},
|
final Map<String, dynamic> usermeta = const {},
|
||||||
final Map<String, dynamic> metadata = const {}})
|
final Map<String, dynamic> metadata = const {},
|
||||||
|
this.thumbnail})
|
||||||
: _usermeta = usermeta,
|
: _usermeta = usermeta,
|
||||||
_metadata = metadata,
|
_metadata = metadata,
|
||||||
super._();
|
super._();
|
||||||
@ -569,9 +583,12 @@ class _$SnAttachmentImpl extends _SnAttachment {
|
|||||||
return EqualUnmodifiableMapView(_metadata);
|
return EqualUnmodifiableMapView(_metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String? thumbnail;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAttachment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, destination: $destination, refCount: $refCount, contentRating: $contentRating, qualityRating: $qualityRating, fileChunks: $fileChunks, cleanedAt: $cleanedAt, isAnalyzed: $isAnalyzed, isUploaded: $isUploaded, isSelfRef: $isSelfRef, ref: $ref, refId: $refId, pool: $pool, poolId: $poolId, accountId: $accountId, usermeta: $usermeta, metadata: $metadata)';
|
return 'SnAttachment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, destination: $destination, refCount: $refCount, contentRating: $contentRating, qualityRating: $qualityRating, fileChunks: $fileChunks, cleanedAt: $cleanedAt, isAnalyzed: $isAnalyzed, isUploaded: $isUploaded, isSelfRef: $isSelfRef, ref: $ref, refId: $refId, pool: $pool, poolId: $poolId, accountId: $accountId, usermeta: $usermeta, metadata: $metadata, thumbnail: $thumbnail)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -617,7 +634,9 @@ class _$SnAttachmentImpl extends _SnAttachment {
|
|||||||
(identical(other.accountId, accountId) ||
|
(identical(other.accountId, accountId) ||
|
||||||
other.accountId == accountId) &&
|
other.accountId == accountId) &&
|
||||||
const DeepCollectionEquality().equals(other._usermeta, _usermeta) &&
|
const DeepCollectionEquality().equals(other._usermeta, _usermeta) &&
|
||||||
const DeepCollectionEquality().equals(other._metadata, _metadata));
|
const DeepCollectionEquality().equals(other._metadata, _metadata) &&
|
||||||
|
(identical(other.thumbnail, thumbnail) ||
|
||||||
|
other.thumbnail == thumbnail));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@ -650,7 +669,8 @@ class _$SnAttachmentImpl extends _SnAttachment {
|
|||||||
poolId,
|
poolId,
|
||||||
accountId,
|
accountId,
|
||||||
const DeepCollectionEquality().hash(_usermeta),
|
const DeepCollectionEquality().hash(_usermeta),
|
||||||
const DeepCollectionEquality().hash(_metadata)
|
const DeepCollectionEquality().hash(_metadata),
|
||||||
|
thumbnail
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Create a copy of SnAttachment
|
/// Create a copy of SnAttachment
|
||||||
@ -697,7 +717,8 @@ abstract class _SnAttachment extends SnAttachment {
|
|||||||
required final int poolId,
|
required final int poolId,
|
||||||
required final int accountId,
|
required final int accountId,
|
||||||
final Map<String, dynamic> usermeta,
|
final Map<String, dynamic> usermeta,
|
||||||
final Map<String, dynamic> metadata}) = _$SnAttachmentImpl;
|
final Map<String, dynamic> metadata,
|
||||||
|
final String? thumbnail}) = _$SnAttachmentImpl;
|
||||||
const _SnAttachment._() : super._();
|
const _SnAttachment._() : super._();
|
||||||
|
|
||||||
factory _SnAttachment.fromJson(Map<String, dynamic> json) =
|
factory _SnAttachment.fromJson(Map<String, dynamic> json) =
|
||||||
@ -757,6 +778,8 @@ abstract class _SnAttachment extends SnAttachment {
|
|||||||
Map<String, dynamic> get usermeta;
|
Map<String, dynamic> get usermeta;
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> get metadata;
|
Map<String, dynamic> get metadata;
|
||||||
|
@override
|
||||||
|
String? get thumbnail;
|
||||||
|
|
||||||
/// Create a copy of SnAttachment
|
/// Create a copy of SnAttachment
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@ -37,6 +37,7 @@ _$SnAttachmentImpl _$$SnAttachmentImplFromJson(Map<String, dynamic> json) =>
|
|||||||
accountId: (json['account_id'] as num).toInt(),
|
accountId: (json['account_id'] as num).toInt(),
|
||||||
usermeta: json['usermeta'] as Map<String, dynamic>? ?? const {},
|
usermeta: json['usermeta'] as Map<String, dynamic>? ?? const {},
|
||||||
metadata: json['metadata'] as Map<String, dynamic>? ?? const {},
|
metadata: json['metadata'] as Map<String, dynamic>? ?? const {},
|
||||||
|
thumbnail: json['thumbnail'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) =>
|
Map<String, dynamic> _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) =>
|
||||||
@ -68,6 +69,7 @@ Map<String, dynamic> _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) =>
|
|||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
'usermeta': instance.usermeta,
|
'usermeta': instance.usermeta,
|
||||||
'metadata': instance.metadata,
|
'metadata': instance.metadata,
|
||||||
|
'thumbnail': instance.thumbnail,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$SnAttachmentPoolImpl _$$SnAttachmentPoolImplFromJson(
|
_$SnAttachmentPoolImpl _$$SnAttachmentPoolImplFromJson(
|
||||||
|
@ -32,7 +32,7 @@ class _AccountSelectState extends State<AccountSelect> {
|
|||||||
final List<SnAccount> _pendingUsers = List.empty(growable: true);
|
final List<SnAccount> _pendingUsers = List.empty(growable: true);
|
||||||
final List<SnAccount> _selectedUsers = List.empty(growable: true);
|
final List<SnAccount> _selectedUsers = List.empty(growable: true);
|
||||||
|
|
||||||
int _accountId = 0;
|
final int _accountId = 0;
|
||||||
|
|
||||||
Future<void> _revertSelectedUsers() async {
|
Future<void> _revertSelectedUsers() async {
|
||||||
if (widget.initialSelection?.isEmpty ?? true) return;
|
if (widget.initialSelection?.isEmpty ?? true) return;
|
||||||
|
@ -80,7 +80,7 @@ class _AttachmentItemSensitiveBlur extends StatefulWidget {
|
|||||||
final Widget child;
|
final Widget child;
|
||||||
final bool isCompact;
|
final bool isCompact;
|
||||||
|
|
||||||
const _AttachmentItemSensitiveBlur({super.key, required this.child, this.isCompact = false});
|
const _AttachmentItemSensitiveBlur({required this.child, this.isCompact = false});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_AttachmentItemSensitiveBlur> createState() => _AttachmentItemSensitiveBlurState();
|
State<_AttachmentItemSensitiveBlur> createState() => _AttachmentItemSensitiveBlurState();
|
||||||
@ -166,7 +166,6 @@ class _AttachmentItemContentVideo extends StatefulWidget {
|
|||||||
final bool isAutoload;
|
final bool isAutoload;
|
||||||
|
|
||||||
const _AttachmentItemContentVideo({
|
const _AttachmentItemContentVideo({
|
||||||
super.key,
|
|
||||||
required this.data,
|
required this.data,
|
||||||
this.isAutoload = false,
|
this.isAutoload = false,
|
||||||
});
|
});
|
||||||
@ -207,7 +206,7 @@ class _AttachmentItemContentVideoState extends State<_AttachmentItemContentVideo
|
|||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
final ratio = widget.data.metadata['ratio'] ?? 16 / 9;
|
final ratio = widget.data.data['ratio'] ?? 16 / 9;
|
||||||
|
|
||||||
final sn = context.read<SnNetworkProvider>();
|
final sn = context.read<SnNetworkProvider>();
|
||||||
|
|
||||||
@ -216,9 +215,9 @@ class _AttachmentItemContentVideoState extends State<_AttachmentItemContentVideo
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
if (widget.data.metadata['thumbnail'] != null)
|
if (widget.data.thumbnail != null)
|
||||||
AutoResizeUniversalImage(
|
AutoResizeUniversalImage(
|
||||||
sn.getAttachmentUrl(widget.data.metadata['thumbnail']),
|
sn.getAttachmentUrl(widget.data.thumbnail!),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@ -266,7 +265,7 @@ class _AttachmentItemContentVideoState extends State<_AttachmentItemContentVideo
|
|||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
Duration(
|
Duration(
|
||||||
milliseconds: (widget.data.metadata['duration'] ?? 0).toInt() * 1000,
|
milliseconds: (widget.data.data['duration'] ?? 0).toInt() * 1000,
|
||||||
).toString(),
|
).toString(),
|
||||||
style: GoogleFonts.robotoMono(
|
style: GoogleFonts.robotoMono(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@ -316,7 +315,6 @@ class _AttachmentItemContentAudio extends StatefulWidget {
|
|||||||
final bool isAutoload;
|
final bool isAutoload;
|
||||||
|
|
||||||
const _AttachmentItemContentAudio({
|
const _AttachmentItemContentAudio({
|
||||||
super.key,
|
|
||||||
required this.data,
|
required this.data,
|
||||||
this.isAutoload = false,
|
this.isAutoload = false,
|
||||||
});
|
});
|
||||||
@ -374,11 +372,11 @@ class _AttachmentItemContentAudioState extends State<_AttachmentItemContentAudio
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
if (widget.data.metadata['thumbnail'] != null)
|
if (widget.data.thumbnail != null)
|
||||||
AspectRatio(
|
AspectRatio(
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 16 / 9,
|
||||||
child: AutoResizeUniversalImage(
|
child: AutoResizeUniversalImage(
|
||||||
sn.getAttachmentUrl(widget.data.metadata['thumbnail']),
|
sn.getAttachmentUrl(widget.data.data['thumbnail']),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -459,11 +457,11 @@ class _AttachmentItemContentAudioState extends State<_AttachmentItemContentAudio
|
|||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
if (widget.data.metadata['thumbnail'] != null)
|
if (widget.data.data['thumbnail'] != null)
|
||||||
AspectRatio(
|
AspectRatio(
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 16 / 9,
|
||||||
child: AutoResizeUniversalImage(
|
child: AutoResizeUniversalImage(
|
||||||
sn.getAttachmentUrl(widget.data.metadata['thumbnail']),
|
sn.getAttachmentUrl(widget.data.data['thumbnail']),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -174,7 +174,7 @@ class ChatMessage extends StatelessWidget {
|
|||||||
class _ChatMessageText extends StatelessWidget {
|
class _ChatMessageText extends StatelessWidget {
|
||||||
final SnChatMessage data;
|
final SnChatMessage data;
|
||||||
|
|
||||||
const _ChatMessageText({super.key, required this.data});
|
const _ChatMessageText({required this.data});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -214,7 +214,7 @@ class _ChatMessageText extends StatelessWidget {
|
|||||||
class _ChatMessageSystemNotify extends StatelessWidget {
|
class _ChatMessageSystemNotify extends StatelessWidget {
|
||||||
final SnChatMessage data;
|
final SnChatMessage data;
|
||||||
|
|
||||||
const _ChatMessageSystemNotify({super.key, required this.data});
|
const _ChatMessageSystemNotify({required this.data});
|
||||||
|
|
||||||
String _formatDuration(Duration duration) {
|
String _formatDuration(Duration duration) {
|
||||||
String negativeSign = duration.isNegative ? '-' : '';
|
String negativeSign = duration.isNegative ? '-' : '';
|
||||||
|
@ -60,7 +60,6 @@ class _LinkPreviewEntry extends StatelessWidget {
|
|||||||
final SnLinkMeta meta;
|
final SnLinkMeta meta;
|
||||||
|
|
||||||
const _LinkPreviewEntry({
|
const _LinkPreviewEntry({
|
||||||
super.key,
|
|
||||||
required this.meta,
|
required this.meta,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -549,7 +549,6 @@ class _PostHeadline extends StatelessWidget {
|
|||||||
final bool isEnlarge;
|
final bool isEnlarge;
|
||||||
|
|
||||||
const _PostHeadline({
|
const _PostHeadline({
|
||||||
super.key,
|
|
||||||
required this.data,
|
required this.data,
|
||||||
this.isEnlarge = false,
|
this.isEnlarge = false,
|
||||||
});
|
});
|
||||||
@ -894,7 +893,6 @@ class _PostQuoteContent extends StatelessWidget {
|
|||||||
final bool isFlatted;
|
final bool isFlatted;
|
||||||
|
|
||||||
const _PostQuoteContent({
|
const _PostQuoteContent({
|
||||||
super.key,
|
|
||||||
this.isRelativeDate = true,
|
this.isRelativeDate = true,
|
||||||
this.isFlatted = false,
|
this.isFlatted = false,
|
||||||
required this.child,
|
required this.child,
|
||||||
@ -962,7 +960,7 @@ class _PostQuoteContent extends StatelessWidget {
|
|||||||
class _PostTagsList extends StatelessWidget {
|
class _PostTagsList extends StatelessWidget {
|
||||||
final SnPost data;
|
final SnPost data;
|
||||||
|
|
||||||
const _PostTagsList({super.key, required this.data});
|
const _PostTagsList({required this.data});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -1035,7 +1033,7 @@ class _PostTagsList extends StatelessWidget {
|
|||||||
class _PostVisibilityHint extends StatelessWidget {
|
class _PostVisibilityHint extends StatelessWidget {
|
||||||
final SnPost data;
|
final SnPost data;
|
||||||
|
|
||||||
const _PostVisibilityHint({super.key, required this.data});
|
const _PostVisibilityHint({required this.data});
|
||||||
|
|
||||||
static const List<IconData> kVisibilityIcons = [
|
static const List<IconData> kVisibilityIcons = [
|
||||||
Symbols.public,
|
Symbols.public,
|
||||||
@ -1060,7 +1058,7 @@ class _PostVisibilityHint extends StatelessWidget {
|
|||||||
class _PostTruncatedHint extends StatelessWidget {
|
class _PostTruncatedHint extends StatelessWidget {
|
||||||
final SnPost data;
|
final SnPost data;
|
||||||
|
|
||||||
const _PostTruncatedHint({super.key, required this.data});
|
const _PostTruncatedHint({required this.data});
|
||||||
|
|
||||||
static const int kHumanReadSpeed = 238;
|
static const int kHumanReadSpeed = 238;
|
||||||
|
|
||||||
@ -1102,7 +1100,7 @@ class _PostTruncatedHint extends StatelessWidget {
|
|||||||
class _PostAbuseReportDialog extends StatefulWidget {
|
class _PostAbuseReportDialog extends StatefulWidget {
|
||||||
final SnPost data;
|
final SnPost data;
|
||||||
|
|
||||||
const _PostAbuseReportDialog({super.key, required this.data});
|
const _PostAbuseReportDialog({required this.data});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_PostAbuseReportDialog> createState() => _PostAbuseReportDialogState();
|
State<_PostAbuseReportDialog> createState() => _PostAbuseReportDialogState();
|
||||||
|
@ -96,10 +96,7 @@ class PostMediaPendingList extends StatelessWidget {
|
|||||||
if (!context.mounted) return;
|
if (!context.mounted) return;
|
||||||
|
|
||||||
final attach = context.read<SnAttachmentProvider>();
|
final attach = context.read<SnAttachmentProvider>();
|
||||||
final newAttach = await attach.updateOne(attachments[idx].attachment!.id, thumbnail.alt, metadata: {
|
final newAttach = await attach.updateOne(attachments[idx].attachment!.id, thumbnail: thumbnail.rid);
|
||||||
...attachments[idx].attachment!.metadata,
|
|
||||||
'thumbnail': thumbnail.rid,
|
|
||||||
});
|
|
||||||
|
|
||||||
onUpdate!(idx, PostWriteMedia(newAttach));
|
onUpdate!(idx, PostWriteMedia(newAttach));
|
||||||
}
|
}
|
||||||
|
@ -763,13 +763,13 @@ packages:
|
|||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
flutter_webrtc:
|
flutter_webrtc:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_webrtc
|
name: flutter_webrtc
|
||||||
sha256: "0e138a0a3bf6830c29c8439b17be0e222d0de27fa72f24e6aee4d34de72f22ef"
|
sha256: "3efe9828f19a07d29a51a726759ad0c70a840d231548a1c7d0332075a94db1df"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.5"
|
version: "0.12.5+hotfix.1"
|
||||||
freezed:
|
freezed:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
@ -113,6 +113,7 @@ dependencies:
|
|||||||
version: ^3.0.2
|
version: ^3.0.2
|
||||||
flutter_colorpicker: ^1.1.0
|
flutter_colorpicker: ^1.1.0
|
||||||
fl_chart: ^0.70.0
|
fl_chart: ^0.70.0
|
||||||
|
flutter_webrtc: ^0.12.5+hotfix.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Loading…
Reference in New Issue
Block a user