Ability to crop image

This commit is contained in:
2025-08-04 22:08:18 +08:00
parent ba269dbbb8
commit edd760fbcb
20 changed files with 605 additions and 444 deletions

View File

@@ -238,6 +238,8 @@ class PostComposeScreen extends HookConsumerWidget {
onRequestUpload:
() => ComposeLogic.uploadAttachment(ref, state, idx),
onDelete: () => ComposeLogic.deleteAttachment(ref, state, idx),
onUpdate:
(value) => ComposeLogic.updateAttachment(state, value, idx),
onMove: (delta) {
state.attachments.value = ComposeLogic.moveAttachment(
state.attachments.value,
@@ -265,6 +267,9 @@ class PostComposeScreen extends HookConsumerWidget {
() => ComposeLogic.uploadAttachment(ref, state, idx),
onDelete:
() => ComposeLogic.deleteAttachment(ref, state, idx),
onUpdate:
(value) =>
ComposeLogic.updateAttachment(state, value, idx),
onMove: (delta) {
state.attachments.value = ComposeLogic.moveAttachment(
state.attachments.value,

View File

@@ -308,6 +308,13 @@ class ArticleComposeScreen extends HookConsumerWidget {
state,
idx,
),
onUpdate:
(value) =>
ComposeLogic.updateAttachment(
state,
value,
idx,
),
onDelete:
() => ComposeLogic.deleteAttachment(
ref,