DeviceDescriptor.fromPixel constructor
DeviceDescriptor.fromPixel({
- required double height,
- required double width,
- required double pixelRatio,
- required EdgeInsets padding,
- EdgeInsets? paddingLandscape,
- required String name,
- double cornerRadius = 0.0,
- Size? notchSize,
- bool tablet = false,
- required TargetPlatform platform,
Implementation
factory DeviceDescriptor.fromPixel({
required double height,
required double width,
required double pixelRatio,
required EdgeInsets padding,
EdgeInsets? paddingLandscape,
required String name,
double cornerRadius = 0.0,
Size? notchSize,
bool tablet = false,
double navBarHeight = 48,
required TargetPlatform platform,
}) {
return DeviceDescriptor(
name: name,
padding: padding,
platform: platform,
size: Size(width / pixelRatio, height / pixelRatio),
cornerRadius: cornerRadius,
navBarHeight: navBarHeight,
notchSize: notchSize,
paddingLandscape: paddingLandscape,
tablet: tablet,
);
}