MessageCountingChatReducer constructor

MessageCountingChatReducer(
  1. int targetCount
)

Creates a new MessageCountingChatReducer.

targetCount is the target number of messages to retain.

Implementation

MessageCountingChatReducer(this.targetCount) {
  if (targetCount < 1) {
    throw ArgumentError.value(
      targetCount,
      'targetCount',
      'Must be at least 1.',
    );
  }
}