@@ -273,7 +273,7 @@ public void textEditingDelta_TestUpdateEditingValueWithDeltasIsNotInvokedWhenDel
273273 true ,
274274 false , // Delta model is disabled.
275275 TextInputChannel .TextCapitalization .NONE ,
276- new TextInputChannel .InputType (TextInputChannel .TextInputType .TEXT , false , false ),
276+ new TextInputChannel .InputType (TextInputChannel .TextInputType .MULTILINE , false , false ),
277277 null ,
278278 null ,
279279 null ,
@@ -1306,6 +1306,42 @@ public void showTextInput_textInputTypeNone() {
13061306 assertEquals (testImm .isSoftInputVisible (), false );
13071307 }
13081308
1309+ @ Test
1310+ public void inputConnection_textInputTypeMultilineAndSuggestionsDisabled () {
1311+ // Regression test for https://github.com/flutter/flutter/issues/71679.
1312+ View testView = new View (ctx );
1313+ DartExecutor dartExecutor = mock (DartExecutor .class );
1314+ TextInputChannel textInputChannel = new TextInputChannel (dartExecutor );
1315+ TextInputPlugin textInputPlugin =
1316+ new TextInputPlugin (testView , textInputChannel , mock (PlatformViewsController .class ));
1317+ textInputPlugin .setTextInputClient (
1318+ 0 ,
1319+ new TextInputChannel .Configuration (
1320+ false ,
1321+ false ,
1322+ false , // Disable suggestions.
1323+ true ,
1324+ false ,
1325+ TextInputChannel .TextCapitalization .NONE ,
1326+ new TextInputChannel .InputType (TextInputChannel .TextInputType .MULTILINE , false , false ),
1327+ null ,
1328+ null ,
1329+ null ,
1330+ null ,
1331+ null ));
1332+
1333+ EditorInfo editorInfo = new EditorInfo ();
1334+ InputConnection connection =
1335+ textInputPlugin .createInputConnection (testView , mock (KeyboardManager .class ), editorInfo );
1336+
1337+ assertEquals (
1338+ editorInfo .inputType ,
1339+ InputType .TYPE_CLASS_TEXT
1340+ | InputType .TYPE_TEXT_FLAG_MULTI_LINE
1341+ | InputType .TYPE_TEXT_FLAG_NO_SUGGESTIONS
1342+ | InputType .TYPE_TEXT_VARIATION_PASSWORD );
1343+ }
1344+
13091345 // -------- Start: Autofill Tests -------
13101346 @ Test
13111347 public void autofill_enabledByDefault () {
0 commit comments