ViewConfiguration constructor

const ViewConfiguration({
  1. BoxConstraints physicalConstraints = const BoxConstraints(maxWidth: 0, maxHeight: 0),
  2. BoxConstraints logicalConstraints = const BoxConstraints(maxWidth: 0, maxHeight: 0),
  3. double devicePixelRatio = 1.0,
})

Creates a view configuration.

By default, the view has logicalConstraints and physicalConstraints with all dimensions set to zero (i.e. the view is forced to Size.zero) and a devicePixelRatio of 1.0.

ViewConfiguration.fromView is a more convenient way for deriving a ViewConfiguration from a given ui.FlutterView.

Implementation

const ViewConfiguration({
  this.physicalConstraints = const BoxConstraints(maxWidth: 0, maxHeight: 0),
  this.logicalConstraints = const BoxConstraints(maxWidth: 0, maxHeight: 0),
  this.devicePixelRatio = 1.0,
});