APIPermission constructor

APIPermission(
  1. String type, {
  2. bool enabled = true,
  3. DateTime? initTime,
  4. DateTime? endTime,
  5. Map<String, Object>? properties,
})

Implementation

APIPermission(String type,
    {this.enabled = true,
    this.initTime,
    this.endTime,
    Map<String, Object>? properties})
    : type = normalizeType(type),
      properties =
          Map<String, Object>.unmodifiable(properties ?? <String, Object>{}) {
  if (!validateType(type)) {
    throw ArgumentError('Invalid type: $type');
  }
}