aspectRatio property

double aspectRatio

Computes the aspect ratio if the height and width are not null.

Implementation

double get aspectRatio =>
    height != null && width != null && height! > 0 && width! > 0 //
        ? width! / height!
        : 4 / 3;