Skip to content

defaultDoneWidget truncating text on iOS #254

@bbjay

Description

@bbjay

Thanks for this amazing library!

Im running into an issue with where the defaultDoneWidget text is being truncated in certain localizations.
Here with German 'Fertig':

Image

This is the configuration im using:

      KeyboardActions(
        config: KeyboardActionsConfig(
          nextFocus: false,
          defaultDoneWidget: Text(
            'done'.i18n.capitalized,
            style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
          ),
          actions: [...],

My workaround is to use a custom KeyboardActionsItem for it instead:

      KeyboardActions(
        config: KeyboardActionsConfig(
          nextFocus: false,
          actions: [
            KeyboardActionsItem(
              focusNode: _myNumberNode,
              displayDoneButton: false,
              toolbarButtons: [
                (node) => TextButton(
                  onPressed: () => _myNumberNode.unfocus(),
                  child: Text(
                    'done'.i18n.capitalized,
                    style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: Colors.white),
                  ),
                ),
              ],
            ),
          ],
          keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
          keyboardBarColor: Colors.grey[800],
        ),

It works, but would be nice to just use defaultDoneWidget in its intended way.

I tried to add some Padding or a Column to defaultDoneWidget, but this made it only worse.
So I think this has to be fixed in the library.

flutter doctor output
[✓] Flutter (Channel stable, 3.35.4, on macOS 15.6 24G84 darwin-arm64, locale de-CH)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] VS Code (version 1.104.2)
[✓] Connected device (6 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions