File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/neon/neon_talk/lib/src/widgets/rich_object Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ class TalkRichObjectFilePreview extends StatelessWidget {
20
20
Widget build (BuildContext context) {
21
21
return LayoutBuilder (
22
22
builder: (context, constraints) {
23
+ final devicePixelRatio = MediaQuery .of (context).devicePixelRatio;
24
+
23
25
final maxSize = Size (constraints.maxWidth, MediaQuery .sizeOf (context).height / 2 );
24
26
25
27
Size ? logicalSize;
26
- var deviceSize = const Size (- 1 , - 1 );
28
+ var deviceSize = Size (- 1 , maxSize.height / devicePixelRatio );
27
29
28
30
if (parameter.width != null && parameter.height != null ) {
29
- final devicePixelRatio = MediaQuery .of (context).devicePixelRatio;
30
-
31
31
deviceSize = Size (
32
32
_parseDimension (parameter.width! ).toDouble (),
33
33
_parseDimension (parameter.height! ).toDouble (),
@@ -66,7 +66,8 @@ class TalkRichObjectFilePreview extends StatelessWidget {
66
66
(b) => b
67
67
..fileId = int .parse (parameter.id)
68
68
..x = deviceSize.width.toInt ()
69
- ..y = deviceSize.height.toInt (),
69
+ ..y = deviceSize.height.toInt ()
70
+ ..a = true ,
70
71
),
71
72
),
72
73
);
You can’t perform that action at this time.
0 commit comments