DesignSize.fromDimensions constructor

DesignSize.fromDimensions({
  1. double phoneWidth = 375,
  2. double phoneHeight = 812,
  3. double tabletWidth = 768,
  4. double tabletHeight = 1024,
  5. double desktopWidth = 1440,
  6. double desktopHeight = 900,
})

Creates a design size from width and height values.

Implementation

DesignSize.fromDimensions({
  double phoneWidth = 375,
  double phoneHeight = 812,
  double tabletWidth = 768,
  double tabletHeight = 1024,
  double desktopWidth = 1440,
  double desktopHeight = 900,
}) : phone = Size(phoneWidth, phoneHeight),
     tablet = Size(tabletWidth, tabletHeight),
     desktop = Size(desktopWidth, desktopHeight);