DimenMetrics.from constructor

DimenMetrics.from(
  1. ScreenConfiguration configuration, {
  2. bool isInMultiWindowMode = false,
})

Builds the metrics from a ScreenConfiguration.

Implementation

factory DimenMetrics.from(
  ScreenConfiguration configuration, {
  bool isInMultiWindowMode = false,
}) {
  return DimenMetrics(
    screenWidthDp: configuration.screenWidthDp,
    screenHeightDp: configuration.screenHeightDp,
    smallestScreenWidthDp: configuration.smallestScreenWidthDp,
    densityDpi: configuration.densityDpi,
    fontScale: configuration.fontScale,
    orientation: configuration.orientation,
    uiMode: configuration.uiMode,
    isInMultiWindowMode: isInMultiWindowMode,
    configuration: configuration,
  );
}