addEndingWidget static method

InputDecoration addEndingWidget(
  1. InputDecoration decoration,
  2. dynamic endingWidget,
  3. ScopeManager? scopeManager
)

Implementation

static InputDecoration addEndingWidget(
  InputDecoration decoration,
  dynamic endingWidget,
  ScopeManager? scopeManager,
) {
  if (endingWidget != null) {
    decoration = decoration.copyWith(
      suffixIcon: scopeManager!.buildWidgetFromDefinition(endingWidget),
    );
  }
  return decoration;
}