encodeNum method

  1. @override
void encodeNum(
  1. String key,
  2. num value, {
  3. int? id,
})
override

Encodes a num value for the given key or id.

Implementation

@override
void encodeNum(String key, num value, {int? id}) {
  tick();
  _packer.packString(key);
  if (value is int) {
    _packer.packInt(value);
  } else {
    _packer.packDouble(value.toDouble());
  }
}