TextAttributeCodec<T extends TextAttribute>.stateful constructor

const TextAttributeCodec<T extends TextAttribute>.stateful({
  1. required String typeStr,
  2. required Object? encode(
    1. T
    ),
  3. required T decode(
    1. Object?
    ),
})

Create a text attribute codec for a stateful text attribute.

Implementation

const TextAttributeCodec.stateful({
  required String typeStr,
  required Object? Function(T) encode,
  required T Function(Object?) decode,
}) : super.stateful(typeStr: typeStr, encode: encode, decode: decode);