probe_agent: widgets of package:material_ui and cupertino_ui get wrong answers for is enabled/disabled, is checked and the tooltip selector (Flutter 3.50)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- dart, flutter
- Domain
- mobile-dev, testing-qa
Research direction
Start with the type checks in probe_agent/lib/src/executor.dart, finder.dart, and device_view.dart, then review the measured cases in test/measure_test.dart. Compare handling of legacy and standalone Material and Cupertino widgets, especially enabled state, checked state, and tooltip lookup. Done means those cases pass for migrated widgets on a device while the existing legacy behavior and obscured-field protection remain correct.
Written by the indexing model from the issue text.
Description
What happens
Flutter 3.50 deprecates package:flutter/material.dart and package:flutter/cupertino.dart in favour of the standalone packages material_ui and cupertino_ui ("Migrate to standalone material_ui and cupertino_ui packages", docs.flutter.dev, page dated 2026-11-09). The agent decides what a widget is by its Dart type, taken from package:flutter/material.dart and package:flutter/cupertino.dart (probe_agent/lib/src/executor.dart, finder.dart, device_view.dart). A widget of material_ui is a different class, so on an app that has migrated, some steps give a wrong answer, one of them a silent false pass.
Measured
A scratch app on Flutter 3.50.0 with material_ui 1.11.1 and cupertino_ui 1.1.7 (what ^1.0.0 resolved to), the agent of main (a path dependency), a widget test that runs the agent's own request handler on a screen of each library's widgets. The control is the same screen built from package:flutter/material.dart. One run, no device.
| Step | package:flutter/material.dart (control) |
material_ui / cupertino_ui |
|---|---|---|
see "Submit" (text) and tap "Submit" on an ElevatedButton |
ok | ok |
see #go is enabled (enabled button) |
ok | ok |
see #off is disabled (button with onPressed: null) |
ok | fails: "#off" is enabled |
see #off is enabled (the same disabled button) |
fails: is disabled |
passes (false pass) |
type "x" into #f and see #f contains "x" on a TextField |
ok | ok |
see #cb is checked (Checkbox) and see #sw is checked (Switch) |
ok | fail: "is not a checkable control" |
see #cs is checked (CupertinoSwitch) |
not run | fails: "is not a checkable control" |
tap "Add item" (an IconButton found by its tooltip) |
ok | fails: Widget not found |
type into a CupertinoTextField, contains |
not run | ok |
see #pw is filled (obscured TextField) |
ok | ok |
see "hunter2" (the value of an obscured field must not be found) |
not found, as designed | not found, as designed |
see #f is focused |
ok | ok |
So what runs through the widgets library (text, hit testing, EditableText, focus) works, and the obscured-field protection holds (it goes through EditableText). What is decided by a Material or Cupertino class does not: disabled state of buttons, checked state of checkboxes, switches and radios, the tooltip selector.
Not measured
Route handling (a material_ui Scaffold, dialog or bottom sheet: the agent's route code names BottomSheet, CupertinoPageScaffold and others), TextField(enabled: false), chips and list tiles, TextFormField, DropdownButton, the segmented and picker widgets, probe device view and Studio's inspector, and any device (iOS or Android). Whether the standalone packages re-export or wrap the in-framework classes in a way that would let one check cover both was not read in their source.
Why it matters, and what is not known
The in-framework libraries are still in packages/flutter on 3.50 (the page says "formally deprecated" and gives no removal version), so apps that have not migrated are unaffected. An app that migrates and is tested with FlutterProbe gets the answers above, and is enabled on a disabled button passes. The CLI cannot see it.
Not fixed here
This is a report with a measurement (the RELEASES log gets a note). A fix has to recognise both families of classes (by importing material_ui and cupertino_ui, which raises the Flutter floor of the agent to 3.47, by class name, or by another test of the widget) and has to be tested on a device with a migrated fixture; the choice is open.
The measurement test (scratch, test/measure_test.dart of an app that depends on material_ui, cupertino_ui and the agent)
import 'dart:convert';
import 'package:cupertino_ui/cupertino_ui.dart' as cui;
import 'package:flutter/material.dart' as fm; // the legacy in-framework library: the control
import 'package:flutter/widgets.dart';
import 'package:flutter_probe_agent/src/executor.dart';
import 'package:flutter_probe_agent/src/protocol.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:material_ui/material_ui.dart' as mu;
// What the agent does on widgets from package:material_ui / cupertino_ui compared with the same widgets from package:flutter/material.dart.
// Each case prints one line: "<library> | <step> | ok" or the error message.
final results = <String>[];
Future<String> run(ProbeExecutor ex, List<String> sent, String method, Map<String, dynamic> params) async {
sent.clear();
await ex.dispatch(ProbeRequest(jsonrpc: '2.0', id: 1, method: method, params: params));
final m = jsonDecode(sent.last) as Map<String, dynamic>;
return m.containsKey('error') ? ((m['error'] as Map)['message'] as String).split('\n').first : 'ok';
}
Map<String, dynamic> byText(String t, {String check = '', bool negated = false}) => {
'selector': {'kind': 'text', 'text': t},
if (check.isNotEmpty) 'check': check,
'negated': negated,
};
Map<String, dynamic> byId(String id, {String check = '', bool negated = false}) => {
'selector': {'kind': 'id', 'text': '#$id'},
if (check.isNotEmpty) 'check': check,
'negated': negated,
};
Widget muApp(Widget body) => mu.MaterialApp(home: mu.Scaffold(body: body));
Widget fmApp(Widget body) => fm.MaterialApp(home: fm.Scaffold(body: body));
void main() {
for (final lib in ['flutter/material', 'material_ui']) {
final isMu = lib == 'material_ui';
testWidgets('measure $lib', (tester) async {
final sent = <String>[];
final ex = ProbeExecutor((m) => sent.add(m));
bool checked = true;
bool sw = true;
final pw = TextEditingController(text: 'hunter2-SECRET');
final field = TextEditingController();
final body = Column(children: [
isMu ? mu.ElevatedButton(key: const ValueKey('go'), onPressed: () {}, child: const Text('Submit')) : fm.ElevatedButton(key: const ValueKey('go'), onPressed: () {}, child: const Text('Submit')),
isMu ? const mu.ElevatedButton(key: ValueKey('off'), onPressed: null, child: Text('Disabled one')) : const fm.ElevatedButton(key: ValueKey('off'), onPressed: null, child: Text('Disabled one')),
isMu ? mu.TextField(key: const ValueKey('f'), controller: field) : fm.TextField(key: const ValueKey('f'), controller: field),
isMu ? mu.TextField(key: const ValueKey('pw'), obscureText: true, controller: pw) : fm.TextField(key: const ValueKey('pw'), obscureText: true, controller: pw),
isMu ? mu.Checkbox(key: const ValueKey('cb'), value: checked, onChanged: (v) {}) : fm.Checkbox(key: const ValueKey('cb'), value: checked, onChanged: (v) {}),
isMu ? mu.Switch(key: const ValueKey('sw'), value: sw, onChanged: (v) {}) : fm.Switch(key: const ValueKey('sw'), value: sw, onChanged: (v) {}),
isMu ? mu.IconButton(key: const ValueKey('ib'), tooltip: 'Add item', icon: const Icon(IconData(0xe047)), onPressed: () {}) : fm.IconButton(key: const ValueKey('ib'), tooltip: 'Add item', icon: const Icon(IconData(0xe047)), onPressed: () {}),
]);
await tester.pumpWidget(isMu ? muApp(body) : fmApp(body));
await tester.pumpAndSettle();
Future<void> rec(String step, String method, Map<String, dynamic> p) async => results.add('$lib | $step | ${await run(ex, sent, method, p)}');
await rec('see "Submit"', ProbeMethods.see, byText('Submit'));
await rec('tap "Submit"', ProbeMethods.tap, byText('Submit'));
await rec('see #go is enabled', ProbeMethods.see, byId('go', check: 'enabled'));
await rec('see #off is disabled', ProbeMethods.see, byId('off', check: 'disabled'));
await rec('see #off is enabled (should fail)', ProbeMethods.see, byId('off', check: 'enabled'));
await rec('type "x" into #f', ProbeMethods.type_, {'selector': {'kind': 'id', 'text': '#f'}, 'text': 'x'});
await rec('see #f contains "x"', ProbeMethods.see, {...byId('f', check: 'contains'), 'check_val': 'x'});
await rec('see #cb is checked', ProbeMethods.see, byId('cb', check: 'checked'));
await rec('see #sw is checked', ProbeMethods.see, byId('sw', check: 'checked'));
await rec('tap "Add item" (tooltip)', ProbeMethods.tap, byText('Add item'));
await rec('see #pw is filled', ProbeMethods.see, byId('pw', check: 'filled'));
await rec('see "hunter2" (must NOT find the password)', ProbeMethods.see, byText('hunter2'));
await rec('see #f is focused', ProbeMethods.see, byId('f', check: 'focused'));
});
}
testWidgets('cupertino_ui', (tester) async {
final sent = <String>[];
final ex = ProbeExecutor((m) => sent.add(m));
await tester.pumpWidget(mu.MaterialApp(home: mu.Scaffold(body: Column(children: [
cui.CupertinoTextField(key: const ValueKey('ct'), placeholder: 'Type here'),
cui.CupertinoSwitch(key: const ValueKey('cs'), value: true, onChanged: (v) {}),
]))));
await tester.pumpAndSettle();
results.add('cupertino_ui | type "x" into #ct | ${await run(ex, sent, ProbeMethods.type_, {'selector': {'kind': 'id', 'text': '#ct'}, 'text': 'x'})}');
results.add('cupertino_ui | see #ct contains "x" | ${await run(ex, sent, ProbeMethods.see, {...byId('ct', check: 'contains'), 'check_val': 'x'})}');
results.add('cupertino_ui | see #cs is checked | ${await run(ex, sent, ProbeMethods.see, byId('cs', check: 'checked'))}');
});
tearDownAll(() {
// ignore: avoid_print
print('\n=== RESULTS ===\n${results.join('\n')}\n=== END ===');
});
}
- Dominant language
- Go
- Stars
- 6
- Forks
- 3
- Avg merge
- 6h 28m
- Merged PRs (30d)
- 362
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AlphaWaveSystems/flutter-probe
-
agent: is checked on a wrapper holding several checkables answers from the first one in tree orderOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AlphaWaveSystems/flutter-probe#865 ·
Maintainers usually reply within 1 day
-
area/cli bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
AlphaWaveSystems/flutter-probe#424 ·
Maintainers usually reply within 1 day
-
area/docs documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AlphaWaveSystems/flutter-probe#409 ·
Maintainers usually reply within 1 day
-
Dial timeout error should say how long it waited and name the timeout settingPossibly taken @jay23606 claimed this 2 days ago. Openarea/cli bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AlphaWaveSystems/flutter-probe#408 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
AlphaWaveSystems/flutter-probe#888 ·
Maintainers usually reply within 1 day
All issues in AlphaWaveSystems/flutter-probe
Similar issues
-
agent-review-finding chore
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
jordansmall/spindrift#7254 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pg-sharding/spqr#3275 ·
Maintainers usually reply within 1 day
-
create_or_update_file rejects explicitly empty file contentPossibly taken @Elon-Jiang claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github/github-mcp-server#3883 ·
Maintainers usually reply within 4 days
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
databricks/terraform-provider-databricks#6210 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
Maintainers usually reply within 2 days