aspectRatio property Null safety

double aspectRatio

The aspect ratio to attempt to use.

The aspect ratio is expressed as a ratio of width to height. For example, a 16:9 width:height aspect ratio would have a value of 16.0/9.0.

Implementation

double get aspectRatio => _aspectRatio;
void aspectRatio=(double value)

Implementation

set aspectRatio(double value) {
  assert(value != null);
  assert(value > 0.0);
  assert(value.isFinite);
  if (_aspectRatio == value)
    return;
  _aspectRatio = value;
  markNeedsLayout();
}