checkOpenArguments method

void checkOpenArguments({
  1. int? version,
  2. OnUpgradeNeededFunction? onUpgradeNeeded,
})
inherited

Check open arguments

Implementation

void checkOpenArguments(
    {int? version, OnUpgradeNeededFunction? onUpgradeNeeded}) {
  // check params
  if (((version != null) || (onUpgradeNeeded != null)) &&
      ((version == null) || (onUpgradeNeeded == null))) {
    throw ArgumentError(
        'version and onUpgradeNeeded must be specified together');
  }
  if (version == 0) {
    throw ArgumentError('version cannot be 0');
  }
}