RectangularViewfinder.withStyleAndLineStyle constructor
RectangularViewfinder.withStyleAndLineStyle(
- RectangularViewfinderStyle style,
- 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);
}