From 6caad19365bd567e875ba7d431b1591b2ea80ebb Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 27 Jun 2024 11:05:15 +0800 Subject: [PATCH] :art: Change naming's way --- lib/screens/posts/post_publish.dart | 2 +- .../attachments/attachment_publish.dart | 22 +++++++++---------- lib/widgets/chat/chat_message_input.dart | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/screens/posts/post_publish.dart b/lib/screens/posts/post_publish.dart index 040a468..686447e 100644 --- a/lib/screens/posts/post_publish.dart +++ b/lib/screens/posts/post_publish.dart @@ -51,7 +51,7 @@ class _PostPublishingScreenState extends State { void showAttachments() { showModalBottomSheet( context: context, - builder: (context) => AttachmentPublishingPopup( + builder: (context) => AttachmentPublishPopup( usage: 'i.attachment', current: _attachments, onUpdate: (value) => _attachments = value, diff --git a/lib/widgets/attachments/attachment_publish.dart b/lib/widgets/attachments/attachment_publish.dart index 8ae5a51..5393fba 100644 --- a/lib/widgets/attachments/attachment_publish.dart +++ b/lib/widgets/attachments/attachment_publish.dart @@ -11,12 +11,12 @@ import 'package:solian/models/attachment.dart'; import 'package:solian/providers/auth.dart'; import 'package:solian/providers/content/attachment.dart'; -class AttachmentPublishingPopup extends StatefulWidget { +class AttachmentPublishPopup extends StatefulWidget { final String usage; final List current; final void Function(List data) onUpdate; - const AttachmentPublishingPopup({ + const AttachmentPublishPopup({ super.key, required this.usage, required this.current, @@ -24,11 +24,11 @@ class AttachmentPublishingPopup extends StatefulWidget { }); @override - State createState() => - _AttachmentPublishingPopupState(); + State createState() => + _AttachmentPublishPopupState(); } -class _AttachmentPublishingPopupState extends State { +class _AttachmentPublishPopupState extends State { final _imagePicker = ImagePicker(); bool _isBusy = false; @@ -273,7 +273,7 @@ class _AttachmentPublishingPopupState extends State { showDialog( context: context, builder: (context) { - return AttachmentEditingDialog( + return AttachmentEditorDialog( item: element, onDelete: () { setState( @@ -353,23 +353,23 @@ class _AttachmentPublishingPopupState extends State { } } -class AttachmentEditingDialog extends StatefulWidget { +class AttachmentEditorDialog extends StatefulWidget { final Attachment item; final Function onDelete; final Function(Attachment item) onUpdate; - const AttachmentEditingDialog( + const AttachmentEditorDialog( {super.key, required this.item, required this.onDelete, required this.onUpdate}); @override - State createState() => - _AttachmentEditingDialogState(); + State createState() => + _AttachmentEditorDialogState(); } -class _AttachmentEditingDialogState extends State { +class _AttachmentEditorDialogState extends State { final _ratioController = TextEditingController(); final _altController = TextEditingController(); diff --git a/lib/widgets/chat/chat_message_input.dart b/lib/widgets/chat/chat_message_input.dart index 50d96eb..4522efb 100644 --- a/lib/widgets/chat/chat_message_input.dart +++ b/lib/widgets/chat/chat_message_input.dart @@ -46,7 +46,7 @@ class _ChatMessageInputState extends State { void showAttachments() { showModalBottomSheet( context: context, - builder: (context) => AttachmentPublishingPopup( + builder: (context) => AttachmentPublishPopup( usage: 'm.attachment', current: _attachments, onUpdate: (value) => _attachments = value,