# TextPosition constructor

const TextPosition({int offset, TextAffinity affinity: TextAffinity.downstream })

Creates an object representing a particular position in a string.

The arguments must not be null (so the `offset` argument is required).

## Implementation

    const TextPosition({
      this.offset,
      this.affinity: TextAffinity.downstream,
    }) : assert(offset != null),
         assert(affinity != null);