MethodFilterGate constructor

MethodFilterGate({
  1. Key? key,
  2. required Component child,
  3. List<Methods> allowedMethods = const [],
  4. List<Methods> blockedMethods = const [],
})

Implementation

MethodFilterGate(
    {Key? key,
    required this.child,
    this.allowedMethods = const [],
    this.blockedMethods = const []})
    : assert(() {
        for (var blocked in blockedMethods) {
          if (allowedMethods.contains(blocked)) {
            return false;
          }
        }
        return true;
      }(), "Allowed Methods Contains Blocked Methods"),
      super(key: key);