Fix attachments not show when click ShowAll button
(cherry picked from commit 15f4dabd8c2dd8417ca4350ad736fb9929dcc6d6)
This commit is contained in:
@@ -352,28 +352,6 @@ abstract class BaseComposerView extends GetWidget<ComposerController>
|
|||||||
) {
|
) {
|
||||||
const double maxHeightItem = 60;
|
const double maxHeightItem = 60;
|
||||||
if (expandMode == ExpandMode.EXPAND) {
|
if (expandMode == ExpandMode.EXPAND) {
|
||||||
if (PlatformInfo.isWeb) {
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
} else {
|
|
||||||
return LayoutBuilder(builder: (context, constraints) {
|
|
||||||
return GridView.builder(
|
|
||||||
key: const Key('list_attachment_full'),
|
|
||||||
primary: false,
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: uploadFilesState.length,
|
|
||||||
gridDelegate: SliverGridDelegateFixedHeight(
|
|
||||||
height: maxHeightItem,
|
|
||||||
crossAxisCount: ComposerStyle.getMaxItemRowListAttachment(context, constraints),
|
|
||||||
crossAxisSpacing: 8.0,
|
|
||||||
mainAxisSpacing: 8.0),
|
|
||||||
itemBuilder: (context, index) => AttachmentFileComposerBuilder(
|
|
||||||
uploadFilesState[index],
|
|
||||||
onDeleteAttachmentAction: (attachment) => controller.deleteAttachmentUploaded(attachment.uploadTaskId)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (PlatformInfo.isWeb) {
|
if (PlatformInfo.isWeb) {
|
||||||
return LayoutBuilder(builder: (context, constraints) {
|
return LayoutBuilder(builder: (context, constraints) {
|
||||||
return Align(
|
return Align(
|
||||||
@@ -399,6 +377,28 @@ abstract class BaseComposerView extends GetWidget<ComposerController>
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
return LayoutBuilder(builder: (context, constraints) {
|
||||||
|
return GridView.builder(
|
||||||
|
key: const Key('list_attachment_full'),
|
||||||
|
primary: false,
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: uploadFilesState.length,
|
||||||
|
gridDelegate: SliverGridDelegateFixedHeight(
|
||||||
|
height: maxHeightItem,
|
||||||
|
crossAxisCount: ComposerStyle.getMaxItemRowListAttachment(context, constraints),
|
||||||
|
crossAxisSpacing: 8.0,
|
||||||
|
mainAxisSpacing: 8.0),
|
||||||
|
itemBuilder: (context, index) => AttachmentFileComposerBuilder(
|
||||||
|
uploadFilesState[index],
|
||||||
|
onDeleteAttachmentAction: (attachment) => controller.deleteAttachmentUploaded(attachment.uploadTaskId)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (PlatformInfo.isWeb) {
|
||||||
|
return const SizedBox.shrink();
|
||||||
} else {
|
} else {
|
||||||
return LayoutBuilder(builder: (context, constraints) {
|
return LayoutBuilder(builder: (context, constraints) {
|
||||||
return Align(
|
return Align(
|
||||||
|
|||||||
Reference in New Issue
Block a user