toMatrix method
Creates a transformation matrix that applies the devicePixelRatio.
The matrix translates points from the local coordinate system of the app (in logical pixels) to the global coordinate system of the FlutterView (in physical pixels).
Implementation
Matrix4 toMatrix() {
return Matrix4.diagonal3Values(devicePixelRatio, devicePixelRatio, 1.0);
}