InputCounterWidgetBuilder typedef

InputCounterWidgetBuilder = Widget Function(BuildContext context, {int currentLength, bool isFocused, int maxLength})

Signature for the TextSpanFieldPlus.buildCounter callback.

Implementation

typedef InputCounterWidgetBuilder = Widget Function(
    /// The build context for the TextSpanFieldPlus
    BuildContext context, {

      /// The length of the string currently in the input.
      @required int currentLength,

      /// The maximum string length that can be entered into the TextSpanFieldPlus.
      @required int maxLength,

      /// Whether or not the TextSpanFieldPlus is currently focused.  Mainly provided for
      /// the [liveRegion] parameter in the [Semantics] widget for accessibility.
      @required bool isFocused,
    });