Repository navigation
Description
Summary
inspect does not list Material 3 FilledButton or CheckboxListTile as interactive widgets. tap by ValueKey finds those widgets, but when hittable is false (debug overlay / modal scrim covering the app) _tryInvokeCallback no-ops for both types, so the CLI reports Tapped and the UI does not change.
set_checkbox already understands CheckboxListTile (_getCheckboxState), then calls _performTapWithDetails, which hits the same no-op.
Published 0.9.37 (c31a08ead80e) is GitHub main. Re-activating dart pub global activate flutter_skill and flutter pub upgrade flutter_skill cannot pick up a newer release.
Environment
- flutter_skill 0.9.37 (app
FlutterSkillBinding+dart pub global activate flutter_skill) - Flutter 3.47.x / Dart 3.13.x
- Android emulator (Pixel 10 Pro XL, 1344×2992) with ISpect overlay (
--dart-define=ISPECT_ENABLED=true) - Modal
showModalBottomSheetcontainingCheckboxListTile+FilledButtonwithValueKeys
Repro
showModalBottomSheet<void>(
context: context,
builder: (context) => Column(
mainAxisSize: MainAxisSize.min,
children: [
CheckboxListTile(
key: const ValueKey('appointment-consent-treatment'),
value: false,
onChanged: (_) {},
title: const Text('Treatment'),
),
FilledButton(
key: const ValueKey('appointment-consent-grant'),
onPressed: () {},
child: const Text('Grant'),
),
],
),
);dart run flutter_skill inspect --output=json "ws://127.0.0.1:<vm>/ws"
dart run flutter_skill act "ws://…" find_element appointment-consent-grant
dart run flutter_skill act "ws://…" tap appointment-consent-grant
Actual
inspect (28 elements on a live VitalForge consumer sheet):
- 27
hittable: false(home chrome under the scrim, closeIconButton, chips) - 1
hittable: true— ISpect floating pillGestureDetector(~40×40) - No
FilledButton, noCheckboxListTile, noappointment-consent-*keys - Close control appears as
type: Button, widgetType: IconButton, key: nulleven though the widget hasValueKey('appointment-detail-close')
find_element appointment-consent-grant → not found while the form is hidden (granted state). While the form is showing, tap appointment-consent-treatment prints Tapped and either does nothing or the pointer hits the modal barrier and dismisses the sheet.
Expected
inspectlistsFilledButton/ButtonStyleButtonwith theValueKey(andSemantics.identifierwhen set).inspectlistsCheckboxListTile(or the keyed parent) withvalue/enabled, not only an inner key-lessCheckbox.- When
hittableis false,tap/set_checkboxinvokeFilledButton.onPressedandCheckboxListTile.onChanged(same asElevatedButton/IconButton/GestureDetectortoday). - Overlay-route widgets (modal sheet) are listed even when a debug pill is the only hittable hit-test target.
Source (0.9.37 lib/flutter_skill.dart)
Allowlist — no FilledButton, no CheckboxListTile:
static bool _isInteractiveWidget(Widget widget) {
return widget is ElevatedButton ||
widget is TextButton ||
widget is OutlinedButton ||
widget is IconButton ||
widget is FloatingActionButton ||
widget is TextField ||
widget is TextFormField ||
widget is Checkbox ||
widget is Switch ||
widget is Slider ||
widget is DropdownButton ||
(widget is InkWell && widget.onTap != null) ||
(widget is GestureDetector && widget.onTap != null) ||
widget is ListTile;
}Same gap in _findInteractiveElements / _findInteractiveElementsStructured and SemanticRefGenerator._getSemanticRole.
Tap path:
if (_isHittableAt(element, center)) {
await _dispatchTap(center);
} else {
_tryInvokeCallback(element); // Elevated/Text/Outlined/IconButton/FAB/InkWell/GestureDetector only
}_getCheckboxState already handles CheckboxListTile / SwitchListTile; _tryInvokeCallback does not call onChanged.
Suggested fix
- Treat
ButtonStyleButton(coversFilledButton,ElevatedButton,OutlinedButton,TextButton) in inspect, semantic refs, and_tryInvokeCallback. - Treat
CheckboxListTile/SwitchListTile/RadioListTilethe same way; invokeonChanged?.call(!(value ?? false)). - Emit
Semantics.identifieron inspect entries and resolvetap/set_checkbox/find_elementby identifier as well asValueKey. - When an overlay route is current, prefer its interactive (and keyed) widgets even if a debug overlay makes
hittablefalse.
Related
- tap by ref/coordinates rejected by published server; tap(text:) hits background route in stacked screens #52 tap hits background route in stacked screens (partially addressed by topmost-match in 0.9.37; modal + ISpect still drops sheet controls)
- fix(input): reliable synthetic pointer engine — single activation, timestamps, drag hold, hittable flag, screenshot geometry #59 hittable flag / single activation (the fallback path is why missing callback types now silently succeed)
Activity