buildGenericTabletDevice function

DeviceInfo buildGenericTabletDevice({
  1. required TargetPlatform platform,
  2. required String id,
  3. required String name,
  4. required Size screenSize,
  5. EdgeInsets safeAreas = EdgeInsets.zero,
  6. EdgeInsets rotatedSafeAreas = EdgeInsets.zero,
  7. double pixelRatio = 2.0,
  8. GenericTabletFramePainter framePainter = const GenericTabletFramePainter(),
})

Creates a generic tablet device definition.

Implementation

DeviceInfo buildGenericTabletDevice({
  required TargetPlatform platform,
  required String id,
  required String name,
  required Size screenSize,
  EdgeInsets safeAreas = EdgeInsets.zero,
  EdgeInsets rotatedSafeAreas = EdgeInsets.zero,
  double pixelRatio = 2.0,
  GenericTabletFramePainter framePainter = const GenericTabletFramePainter(),
}) {
  return DeviceInfo(
    identifier: DeviceIdentifier(
      platform,
      DeviceType.tablet,
      id,
    ),
    name: name,
    pixelRatio: pixelRatio,
    frameSize: framePainter.calculateFrameSize(screenSize),
    screenSize: screenSize,
    safeAreas: safeAreas,
    rotatedSafeAreas: rotatedSafeAreas,
    framePainter: framePainter,
    screenPath: framePainter.createScreenPath(screenSize),
  );
}