textFieldConfig static method

KeyboardActionsConfig textFieldConfig({
  1. required List<FocusNode> nodes,
  2. BuildContext? context,
  3. String? doneString,
  4. Color? background,
})

Implementation

static KeyboardActionsConfig textFieldConfig(
    {required List<FocusNode> nodes,
    BuildContext? context,
    String? doneString,
    Color? background}) {
  return KeyboardActionsConfig(
      keyboardBarColor: background ?? const Color(0xfff2f2f2),
      defaultDoneWidget: Text(
        doneString ?? 'done',
        style:
            context != null ? Theme.of(context).textTheme.labelMedium : null,
      ),
      actions: [...nodes.map((e) => KeyboardActionsItem(focusNode: e))]);
}