opt: root reply
This commit is contained in:
@ -140,16 +140,13 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
try {
|
try {
|
||||||
final XFile? pickedFile =
|
final XFile? pickedFile =
|
||||||
await _picker.pickImage(source: ImageSource.gallery);
|
await _picker.pickImage(source: ImageSource.gallery);
|
||||||
print('选择图片成功: ${pickedFile}');
|
|
||||||
var res = await ReplyHttp.uploadImage(xFile: pickedFile!);
|
var res = await ReplyHttp.uploadImage(xFile: pickedFile!);
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
imageList.add(res['data']['img_src']);
|
imageList.add(res['data']['img_src']);
|
||||||
pictures.add(res['data']);
|
pictures.add(res['data']);
|
||||||
print('imageList: $imageList');
|
|
||||||
print('pictures: $pictures');
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('选择图片失败: $e');
|
debugPrint('选择图片失败: $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -301,6 +298,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
onTap: () =>
|
onTap: () =>
|
||||||
onPreviewImg(imageList, index, context),
|
onPreviewImg(imageList, index, context),
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
|
feedBack();
|
||||||
imageList.removeAt(index);
|
imageList.removeAt(index);
|
||||||
},
|
},
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
@ -379,13 +377,15 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
toolbarType: toolbarType,
|
toolbarType: toolbarType,
|
||||||
selected: toolbarType == 'emote',
|
selected: toolbarType == 'emote',
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
if (widget.root != null && widget.root == 0) ...[
|
||||||
ToolbarIconButton(
|
const SizedBox(width: 10),
|
||||||
onPressed: onChooseImage,
|
ToolbarIconButton(
|
||||||
icon: const Icon(Icons.photo, size: 22),
|
onPressed: onChooseImage,
|
||||||
toolbarType: toolbarType,
|
icon: const Icon(Icons.photo, size: 22),
|
||||||
selected: toolbarType == 'picture',
|
toolbarType: toolbarType,
|
||||||
),
|
selected: toolbarType == 'picture',
|
||||||
|
),
|
||||||
|
],
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Obx(
|
Obx(
|
||||||
() => showForward.value
|
() => showForward.value
|
||||||
|
|||||||
Reference in New Issue
Block a user