Skip to content

Commit 8372afb

Browse files
committed
[green] Dismiss the real Android keyboard
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent e4817ed commit 8372afb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/integration_test/blockly_webview_suite.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Part of PyBLE (https://pyble.dev) — see /LICENSE.
33

44
import 'dart:convert';
5-
import 'dart:typed_data';
65

76
import 'package:flutter/material.dart';
7+
import 'package:flutter/services.dart';
88
import 'package:flutter_riverpod/flutter_riverpod.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

@@ -643,7 +643,8 @@ pixels.write()
643643
// even when ensureVisible has scrolled its RenderBox into the viewport.
644644
// Close it before asserting hit-testability so the integration gate tests
645645
// the action rather than emulator keyboard-animation timing.
646-
tester.testTextInput.hide();
646+
FocusManager.instance.primaryFocus?.unfocus();
647+
await SystemChannels.textInput.invokeMethod<void>('TextInput.hide');
647648
await tester.pumpAndSettle();
648649
final Finder replaceWorkspaceAction = find.byKey(
649650
kBlocksExampleReplaceWorkspaceButtonKey,

0 commit comments

Comments
 (0)