registerTvMode static method

void registerTvMode({
  1. double designHeight = 1080.0,
})

Switches DeviceHelper.getScalingFactor to TV scaling: the factor becomes the screen's shortest side divided by designHeight (default 1080), so a layout drawn for a 1920x1080 screen looks the same on any TV resolution. The result is clamped to 0.5 - 2.0. Off by default; call once at startup when the app runs on a TV.

Implementation

static void registerTvMode({double designHeight = 1080.0}) {
  _tvMode = true;
  _tvDesignHeight = designHeight;
}