RectangularViewfinder.withStyleAndLineStyle constructor

RectangularViewfinder.withStyleAndLineStyle(
  1. RectangularViewfinderStyle style,
  2. RectangularViewfinderLineStyle lineStyle
)

Implementation

factory RectangularViewfinder.withStyleAndLineStyle(
    RectangularViewfinderStyle style, RectangularViewfinderLineStyle lineStyle) {
  var styleDefaults = Defaults.rectangularViewfinderDefaults.styles[style];
  if (styleDefaults == null) {
    throw Exception("RectangularViewfinderDefaults does not contain any defaults for ${style.toString()}");
  }

  return RectangularViewfinder._(style, lineStyle, styleDefaults.size, styleDefaults.color, styleDefaults.dimming,
      styleDefaults.animation, styleDefaults.disabledDimming, styleDefaults.disabledColor);
}