Chat message attachments

This commit is contained in:
2024-04-19 19:36:03 +08:00
parent 82fc191bad
commit ac280f2d40
12 changed files with 121 additions and 34 deletions

View File

@ -40,6 +40,7 @@ class _CommentEditorScreenState extends State<CommentEditorScreen> {
showModalBottomSheet(
context: context,
builder: (context) => AttachmentEditor(
provider: 'interactive',
current: _attachments,
onUpdate: (value) => _attachments = value,
),
@ -151,8 +152,7 @@ class _CommentEditorScreenState extends State<CommentEditorScreen> {
const Divider(thickness: 0.3),
Expanded(
child: Container(
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: TextField(
maxLines: null,
autofocus: true,
@ -160,9 +160,9 @@ class _CommentEditorScreenState extends State<CommentEditorScreen> {
keyboardType: TextInputType.multiline,
controller: _textController,
decoration: InputDecoration.collapsed(
hintText:
AppLocalizations.of(context)!.postContentPlaceholder,
hintText: AppLocalizations.of(context)!.postContentPlaceholder,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
),
),

View File

@ -32,6 +32,7 @@ class _MomentEditorScreenState extends State<MomentEditorScreen> {
showModalBottomSheet(
context: context,
builder: (context) => AttachmentEditor(
provider: 'interactive',
current: _attachments,
onUpdate: (value) => _attachments = value,
),
@ -151,6 +152,7 @@ class _MomentEditorScreenState extends State<MomentEditorScreen> {
decoration: InputDecoration.collapsed(
hintText: AppLocalizations.of(context)!.postContentPlaceholder,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
),
),
),