aspectRatio property

double get aspectRatio

Returns size.width / size.height when size is non-null, or 1.0. when it is.

Implementation

double get aspectRatio => size != null ? size!.width / size!.height : 1.0;