px property

double get px

Use this method when you have pixels values available. For Example your giving 1020 pixels. just use this method right after the value like 1020.px

This method will automatically convert your pixels value into flutter adaptive unit, depends on device pixel ratio

Implementation

double get px => Delta().pixelsToFlutterUnits(this);