ApiRequest constructor

ApiRequest({
  1. required int id,
  2. int idWidth = 4,
  3. Uint8List? data,
})

Creates a new ApiRequest given an id and some optional data.

Implementation

ApiRequest({
  required this.id,
  this.idWidth = 4,
  this.data,
}) {
  if (id < 0) {
    throw ArgumentError('Must not be negative', 'id');
  }
}