Repository navigation
Closed
Labels
r: solvedIssue is closed as solved
Description
Steps to reproduce
- build a sample app with Semantic widget with identifier property
- runApp
- click "+" so the counter value is updated
- use any accessibility tool to check accessibility id on iOS or resource id on Android
Note:
Although when both Semantics.label and Semantics.identifier properties are set, the system correctly updates both values, as you can see in the attached screenshots.
Expected results
When Semantic.identifier property is set, the system should be correctly updated when its value is updated.
Actual results
When Semantic.identifier property is set, the system keep the initial value and not update it
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Semantics(
// label: 'Counter label $_counter',
identifier: 'Counter identifier $_counter',
explicitChildNodes: true,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text('You have pushed the button this many times:'),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
Screenshots or Video
Screenshots / Video demonstration
| ios identifier | ios label + identifier | android identifier | android label + identifier |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.0, on macOS 15.3.1 24D70 darwin-arm64, locale en-UA)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Community Edition (version 2024.3.4.1)
[✓] VS Code (version 1.98.2)
devicectl returned non-JSON response:
[✓] Connected device (4 available)
! Error: Browsing on the local area network for Viktor’s Apple Watch. Ensure the device is unlocked and discoverable via Bluetooth. (code -27)
[✓] Network resources
• No issues found!
Metadata
Metadata
Assignees
Labels
r: solvedIssue is closed as solved




Activity
maheshj01 commentedon Mar 20, 2025
@Vikrech Thanks for filing the issue. I tried to reproduce it on stable 3.29.2 and I was not able to reproduce it. Can you try upgrading to latest stable 3.29.2
Screen.Recording.2025-03-20.at.19.49.21.mov
flutter doctor -v
Vikrech commentedon Mar 21, 2025
First of all thank you @maheshj01 for you time and effort to check on the issue, and secondly it seems there was no issue at all. After retesting it with with Flutter 3.29.0, but using the Widget Inspector the
Semantics.identifierproperty is updating correctly.github-actions commentedon Apr 4, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.