StreamPosition.fromInt64 constructor

StreamPosition.fromInt64(
  1. Int64 value
)

Creates a StreamPosition from a Int64.

Implementation

factory StreamPosition.fromInt64(Int64 value) {
  if (value == Int64.ZERO) {
    return start;
  }
  return value.toInt() == -1 ? end : StreamPosition._(value);
}