DevicePreset constructor

const DevicePreset({
  1. required String id,
  2. required String name,
  3. required TargetPlatform platform,
  4. required Size portraitSize,
  5. required double devicePixelRatio,
  6. String? brand,
  7. int? year,
  8. DeviceFrame? frame,
  9. SystemUiSimulation? systemUi,
  10. EdgeInsets portraitPadding = EdgeInsets.zero,
  11. EdgeInsets? portraitViewPadding,
  12. EdgeInsets? landscapePadding,
  13. EdgeInsets? landscapeViewPadding,
  14. EdgeInsets systemGestureInsets = EdgeInsets.zero,
  15. List<SimulatedDisplayFeature> displayFeatures = const <SimulatedDisplayFeature>[],
  16. DeviceKind kind = DeviceKind.phone,
})

Creates a device preset.

Implementation

const DevicePreset({
  required this.id,
  required this.name,
  required this.platform,
  required this.portraitSize,
  required this.devicePixelRatio,
  this.brand,
  this.year,
  this.frame,
  this.systemUi,
  this.portraitPadding = EdgeInsets.zero,
  this.portraitViewPadding,
  this.landscapePadding,
  this.landscapeViewPadding,
  this.systemGestureInsets = EdgeInsets.zero,
  this.displayFeatures = const <SimulatedDisplayFeature>[],
  this.kind = DeviceKind.phone,
});