ChromaKeyFilter constructor

ChromaKeyFilter(
  1. {int backgroundColor = 0xFF00FF00,
  2. int solidThreshold = 140,
  3. int invisibleThreshold = 20}
)

Implementation

ChromaKeyFilter(
    {this.backgroundColor = 0xFF00FF00,
    int solidThreshold = 140,
    int invisibleThreshold = 20})
    : _solidThreshold = solidThreshold,
      _invisibleThreshold = invisibleThreshold {
  if (invisibleThreshold < 0) {
    throw ArgumentError('The minimum solidThreshold is 0.');
  }
  if (solidThreshold < invisibleThreshold) {
    throw ArgumentError(
        'solidThreshold cannot be lower than invisibleThreshold');
  }
}