🎨 Change naming's way

This commit is contained in:
LittleSheep 2024-06-27 11:05:15 +08:00
parent 4f5762c5a9
commit 6caad19365
3 changed files with 13 additions and 13 deletions

View File

@ -51,7 +51,7 @@ class _PostPublishingScreenState extends State<PostPublishingScreen> {
void showAttachments() { void showAttachments() {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
builder: (context) => AttachmentPublishingPopup( builder: (context) => AttachmentPublishPopup(
usage: 'i.attachment', usage: 'i.attachment',
current: _attachments, current: _attachments,
onUpdate: (value) => _attachments = value, onUpdate: (value) => _attachments = value,

View File

@ -11,12 +11,12 @@ import 'package:solian/models/attachment.dart';
import 'package:solian/providers/auth.dart'; import 'package:solian/providers/auth.dart';
import 'package:solian/providers/content/attachment.dart'; import 'package:solian/providers/content/attachment.dart';
class AttachmentPublishingPopup extends StatefulWidget { class AttachmentPublishPopup extends StatefulWidget {
final String usage; final String usage;
final List<int> current; final List<int> current;
final void Function(List<int> data) onUpdate; final void Function(List<int> data) onUpdate;
const AttachmentPublishingPopup({ const AttachmentPublishPopup({
super.key, super.key,
required this.usage, required this.usage,
required this.current, required this.current,
@ -24,11 +24,11 @@ class AttachmentPublishingPopup extends StatefulWidget {
}); });
@override @override
State<AttachmentPublishingPopup> createState() => State<AttachmentPublishPopup> createState() =>
_AttachmentPublishingPopupState(); _AttachmentPublishPopupState();
} }
class _AttachmentPublishingPopupState extends State<AttachmentPublishingPopup> { class _AttachmentPublishPopupState extends State<AttachmentPublishPopup> {
final _imagePicker = ImagePicker(); final _imagePicker = ImagePicker();
bool _isBusy = false; bool _isBusy = false;
@ -273,7 +273,7 @@ class _AttachmentPublishingPopupState extends State<AttachmentPublishingPopup> {
showDialog( showDialog(
context: context, context: context,
builder: (context) { builder: (context) {
return AttachmentEditingDialog( return AttachmentEditorDialog(
item: element, item: element,
onDelete: () { onDelete: () {
setState( setState(
@ -353,23 +353,23 @@ class _AttachmentPublishingPopupState extends State<AttachmentPublishingPopup> {
} }
} }
class AttachmentEditingDialog extends StatefulWidget { class AttachmentEditorDialog extends StatefulWidget {
final Attachment item; final Attachment item;
final Function onDelete; final Function onDelete;
final Function(Attachment item) onUpdate; final Function(Attachment item) onUpdate;
const AttachmentEditingDialog( const AttachmentEditorDialog(
{super.key, {super.key,
required this.item, required this.item,
required this.onDelete, required this.onDelete,
required this.onUpdate}); required this.onUpdate});
@override @override
State<AttachmentEditingDialog> createState() => State<AttachmentEditorDialog> createState() =>
_AttachmentEditingDialogState(); _AttachmentEditorDialogState();
} }
class _AttachmentEditingDialogState extends State<AttachmentEditingDialog> { class _AttachmentEditorDialogState extends State<AttachmentEditorDialog> {
final _ratioController = TextEditingController(); final _ratioController = TextEditingController();
final _altController = TextEditingController(); final _altController = TextEditingController();

View File

@ -46,7 +46,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
void showAttachments() { void showAttachments() {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
builder: (context) => AttachmentPublishingPopup( builder: (context) => AttachmentPublishPopup(
usage: 'm.attachment', usage: 'm.attachment',
current: _attachments, current: _attachments,
onUpdate: (value) => _attachments = value, onUpdate: (value) => _attachments = value,