PatchbayInspectBridge constructor

PatchbayInspectBridge({
  1. required PatchbayGateEvaluator gates,
  2. PatchbayInspectPolicy policy = const PatchbayInspectPolicy(),
  3. PatchbayInspectorSurface? surface,
})

Implementation

PatchbayInspectBridge({
  required this._gates,
  PatchbayInspectPolicy policy = const PatchbayInspectPolicy(),
  PatchbayInspectorSurface? surface,
}) : _policy = policy,
     _surface = surface ?? const PatchbayBindingInspectorSurface() {
  if (policy.defaultLease <= Duration.zero ||
      policy.maxLease <= Duration.zero ||
      policy.defaultLease > policy.maxLease) {
    throw ArgumentError(
      'Inspect leases must be positive and defaultLease <= maxLease.',
    );
  }
}