RabbitDataConfig constructor

RabbitDataConfig({
  1. required String apiKey,
  2. String encryptKey = '',
  3. DataCollectionType collectionType = DataCollectionType.rotation,
  4. int rotationTime = con.rotationTime,
  5. int retentionDays = con.retentionDays,
  6. int retryTime = con.retryTime,
  7. bool deleteAfterSent = true,
  8. int cpu = con.cpu,
  9. int memory = con.memory,
  10. int batteryLevel = con.battery,
  11. DBType dbType = DBType.hive,
  12. bool? consent,
  13. bool permissionMaid = false,
  14. int sessionExpire = con.sessionExpireMin,
  15. int sessionAutoExpire = con.autoExpireMin,
  16. bool offlineMode = false,
  17. int storageMin = 1,
  18. int storageMax = 5,
  19. bool debugMode = false,
  20. bool isAutoExpire = true,
  21. int locationTimeout = 3,
})

Implementation

RabbitDataConfig(
    {required this.apiKey,
    this.encryptKey = '',
    this.collectionType = DataCollectionType.rotation,
    this.rotationTime = con.rotationTime,
    this.retentionDays = con.retentionDays,
    this.retryTime = con.retryTime,
    this.deleteAfterSent = true,
    this.cpu = con.cpu,
    this.memory = con.memory,
    this.batteryLevel = con.battery,
    this.dbType = DBType.hive,
    this.consent,
    this.permissionMaid = false,
    this.sessionExpire = con.sessionExpireMin,
    this.sessionAutoExpire = con.autoExpireMin,
    this.offlineMode = false,
    this.storageMin = 1,
    this.storageMax = 5,
    this.debugMode = false,
    this.isAutoExpire = true,
    this.locationTimeout = 3})
    : assert(rotationTime >= 1),
      assert(retentionDays >= 0),
      assert(retryTime >= 1),
      assert(cpu >= 0),
      assert(memory >= 0),
      assert(batteryLevel >= 0),
      assert(sessionExpire >= 1),
      assert(sessionAutoExpire >= 1);