convertFlags method

  1. @visibleForTesting
int convertFlags(
  1. List<int> flags
)

This method is just visible for unit testing and should not be relied on. Its method signature may change at any time.

Implementation

@visibleForTesting
int convertFlags(List<int> flags) {
  int finalValue = 0;
  for (int i = 0; i < flags.length; i++) {
    if (!_isPowerOfTwo(flags[i])) {
      throw ArgumentError.value(flags[i], 'flag\'s value must be power of 2');
    }
    finalValue |= flags[i];
  }
  return finalValue;
}