InputCounterWidgetBuilder typedef Null safety

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

Signature for the TextField.buildCounter callback.

Implementation

typedef InputCounterWidgetBuilder = Widget? Function(
  /// The build context for the TextField.
  BuildContext context, {
  /// The length of the string currently in the input.
  required int currentLength,
  /// The maximum string length that can be entered into the TextField.
  required int? maxLength,
  /// Whether or not the TextField is currently focused.  Mainly provided for
  /// the [liveRegion] parameter in the [Semantics] widget for accessibility.
  required bool isFocused,
});