Skip to content

Issue with new spell check feature for TextField. #119868

@TreyThomas93

Description

@TreyThomas93

Issue

Code below works fine on Android emulator...

TextField(
    spellCheckConfiguration: const SpellCheckConfiguration()
);

but when I attempt to run it on a physical device (Galaxy S20+), I get the following error:

_AssertionError ('package:flutter/src/widgets/editable_text.dart': Failed assertion: line 2205 pos 7: 'spellCheckService != null
      || WidgetsBinding.instance.platformDispatcher.nativeSpellCheckServiceDefined': spellCheckService must be specified for this platform because no default service available)     

but when I add a DefaultSpellCheckService instance to the spellCheckService field, it "works", as in it no longer outputs an AssertionError.

TextField(
    spellCheckConfiguration: const SpellCheckConfiguration(
        spellCheckService: DefaultSpellCheckService(),
    )
)

I am then faced with another issue. Every word typed into the TextField is represented as a misspelled word.

screenshot-1675381663389

Any help will be appreciated. Thank you.

Versions

Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b06b8b2 (10 days ago) • 2023-01-23 16:55:55 -0800
Engine • revision b24591ed32
Tools • Dart 2.19.0 • DevTools 2.20.1

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: crashStack traces logged to the consolef: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyr: duplicateIssue is closed as a duplicate of an existing issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions