Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: gallery not rendering in row page (#7349)

Morn5d73c3d19459
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_browser_layout.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_browser_layout.dart
index c0f91a27f0..eb8ddba0b8 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_browser_layout.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_browser_layout.dart
@@ -27,7 +27,7 @@ import 'package:provider/provider.dart';
import '../image_render.dart';
-const _thumbnailItemSize = 100.0;
+const _thumbnailItemSize = 100.0, _imageHeight = 400.0;
class ImageBrowserLayout extends ImageBlockMultiLayout {
const ImageBrowserLayout({
@@ -59,13 +59,13 @@ class _ImageBrowserLayoutState extends State<ImageBrowserLayout> {
@override
Widget build(BuildContext context) {
- return Stack(
+ final gallery = Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
- height: 400,
+ height: _imageHeight,
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onDoubleTap: () => _openInteractiveViewer(context),
@@ -258,6 +258,10 @@ class _ImageBrowserLayoutState extends State<ImageBrowserLayout> {
),
],
);
+ return SizedBox(
+ height: _imageHeight + _thumbnailItemSize + 20,
+ child: gallery,
+ );
}
void _openInteractiveViewer(BuildContext context, [int? index]) => showDialog(