You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var path =awaitHomeWidget.renderFlutterWidget(
constLineChart(),
key:'lineChart',
logicalSize:constSize(400, 400),
pixelRatio:3,
);
You're able to set a pixelRatio. This should default to whatever is set in MediaQueryData.devicePixelRatio. Another way of accessing that data should be possible via the PlatformDispatcher.instance.implicitView.devicePixelRatio.
It should default to whatever the current device pixelratio is, since otherways I always have to manually set it to that value. So by doing this already inside the app, it improves the quality of life of the users.
So this
var path =awaitHomeWidget.renderFlutterWidget(
constLineChart(),
key:'lineChart',
logicalSize:constSize(400, 400),
pixelRatio:PlatformDispatcher.instance.implicitView?.devicePixelRatio ??3,
);
becomes this
var path =awaitHomeWidget.renderFlutterWidget(
constLineChart(),
key:'lineChart',
logicalSize:constSize(400, 400),
);
and the screenshot of the widget is always in the correct resolution.
When creating screenshot widget with
You're able to set a
pixelRatio
. This should default to whatever is set inMediaQueryData.devicePixelRatio
. Another way of accessing that data should be possible via thePlatformDispatcher.instance.implicitView.devicePixelRatio
.It should default to whatever the current device pixelratio is, since otherways I always have to manually set it to that value. So by doing this already inside the app, it improves the quality of life of the users.
So this
becomes this
and the screenshot of the widget is always in the correct resolution.
Additionally, I believe this piece of code
home_widget/lib/home_widget.dart
Line 149 in daea9c1
should also reuse the configured pixel ratio, right?
The text was updated successfully, but these errors were encountered: