Skip to content

ExpansionTile semantics assertion with nested WidgetSpan title in Flutter 3.44.2 #188298

Closed
flutter/packages
#12765

Description

@d-loose

Steps to reproduce

  1. Create a minimal Flutter package.
  2. Add the test below as test/expansion_tile_semantics_test.dart.
  3. Run flutter test.
  4. Observe that the test fails on Flutter 3.44.2.
  5. The same pattern previously passed on Flutter 3.38.10.

Expected results

The widget test should complete without framework assertions. ExpansionTile should be able to build and pump when its title contains a Text.rich with a nested WidgetSpan.

Actual results

Flutter throws a framework semantics assertion during tester.pumpWidget:

'package:flutter/src/rendering/object.dart': Failed assertion: line 5460 pos 12: '!conflict': is not true.

The failure happens during PipelineOwner.flushSemantics.

Code sample

Code sample

pubspec.yaml

name: flutter_semantics_repro
description: Minimal Flutter semantics repro.
publish_to: none

environment:
  sdk: '>=3.8.0 <4.0.0'

dependencies:
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

test/expansion_tile_semantics_test.dart

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('ExpansionTile title allows nested block-like WidgetSpan',
      (tester) async {
    await tester.pumpWidget(
      MaterialApp(
        home: Scaffold(
          body: Text.rich(
            TextSpan(
              children: [
                WidgetSpan(
                  child: ExpansionTile(
                    title: Text.rich(
                      TextSpan(
                        children: [
                          WidgetSpan(
                            child: Text.rich(
                              const TextSpan(
                                style: TextStyle(
                                  fontSize: 32,
                                  fontWeight: FontWeight.bold,
                                ),
                                text: 'Header',
                              ),
                            ),
                          ),
                        ],
                      ),
                    ),
                    children: const [Text('These are the details.')],
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  });

  testWidgets('ExpansionTile title allows plain Text', (tester) async {
    await tester.pumpWidget(
      const MaterialApp(
        home: Scaffold(
          body: ExpansionTile(
            title: Text('Header'),
            children: [Text('These are the details.')],
          ),
        ),
      ),
    );
  });
}

Screenshots or Video

No response

Logs

Screenshots / Video demonstration

Not applicable.

Logs

Logs
$ flutter test
00:00 +0: loading /tmp/flutter_semantics_repro/test/expansion_tile_semantics_test.dart
00:00 +0: ExpansionTile title allows nested block-like WidgetSpan
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter/src/rendering/object.dart': Failed assertion: line 5460 pos 12: '!conflict': is not
true.

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=02_bug.yml

When the exception was thrown, this was the stack:
#2      _IncompleteSemanticsFragment.markSiblingConfigurationConflict (package:flutter/src/rendering/object.dart:5460:12)
#3      _RenderObjectSemantics._marksConflictsInMergeGroup (package:flutter/src/rendering/object.dart:6517:16)
#4      _RenderObjectSemantics.updateChildren (package:flutter/src/rendering/object.dart:5837:5)
#5      _RenderObjectSemantics._didUpdateParentData (package:flutter/src/rendering/object.dart:6071:5)
#6      _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup (package:flutter/src/rendering/object.dart:5995:22)
#7      _RenderObjectSemantics.updateChildren (package:flutter/src/rendering/object.dart:5825:50)
...
#101    PipelineOwner.flushSemantics (package:flutter/src/rendering/object.dart:1489:25)
#102    PipelineOwner.flushSemantics (package:flutter/src/rendering/object.dart:1653:15)
#103    AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:2444:35)
#104    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:509:5)
#105    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1430:15)
#106    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1345:9)
#107    AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:2260:9)
#110    TestAsyncUtils.guard (package:flutter/src/test_async_utils.dart:74:41)
#111    AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:2249:27)
#112    WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:598:22)
#115    TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41)
#116    WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:595:27)
#117    main.<anonymous closure> (file:///tmp/flutter_semantics_repro/test/expansion_tile_semantics_test.dart:7:18)
#118    testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:29)
<asynchronous suspension>
#119    TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1952:5)
<asynchronous suspension>
<asynchronous suspension>
(elided 7 frames from class _AssertionError, dart:async, and package:stack_trace)
════════════════════════════════════════════════════════════════════════════════════════════════════
00:00 +0 -1: ExpansionTile title allows nested block-like WidgetSpan [E]
  Test failed. See exception logs above.
  The test description was: ExpansionTile title allows nested block-like WidgetSpan

00:00 +0 -1: ExpansionTile title allows plain Text
00:00 +1 -1: Some tests failed.

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.44.2, on Ubuntu 26.04 LTS 7.0.0-22-generic, locale en_US.UTF-8) [23ms]
    • Flutter version 3.44.2 on channel stable at /home/[email protected]/fvm/versions/3.44.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c9a6c48423 (11 days ago), 2026-06-10 15:52:41 -0700
    • Engine revision 77e2e94772
    • Dart version 3.12.2
    • DevTools version 2.57.0
    • Feature flags: no-enable-web, enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop, no-enable-android, no-enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Linux toolchain - develop for Linux desktop [265ms]
    • Ubuntu clang version 21.1.8 (6ubuntu1)
    • cmake version 4.2.3
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: AMD Radeon 890M Graphics (radeonsi, strix1, ACO, DRM 3.64, 7.0.0-22-generic)
    • OpenGL core version: 4.6 (Core Profile) Mesa 26.0.3-1ubuntu1
    • OpenGL core shading language version: 4.60
    • OpenGL ES renderer: AMD Radeon 890M Graphics (radeonsi, strix1, ACO, DRM 3.64, 7.0.0-22-generic)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 26.0.3-1ubuntu1
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
    • GL_EXT_framebuffer_blit: yes
    • GL_EXT_texture_format_BGRA8888: yes

[✓] Connected device (1 available) [12ms]
    • Linux (desktop) • linux • linux-x64 • Ubuntu 26.04 LTS 7.0.0-22-generic

[✓] Network resources [196ms]
    • All expected network resources are available.

• No issues found!

Activity

  1. suryaKommana2662 commented on Jun 22, 2026

    @suryaKommana2662
    Contributor

    @d-loose Thanks for the detailed report and the minimal reproduction. I was able to reproduce the reported assertion on Flutter 3.44.2 using the provided test case. The issue includes a reproducible example and logs, making it actionable for further investigation. Routing this issue to the team-accessibility for further investigation

  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
    and removed
    in triagePresently being triaged by the triage team
    on Jun 22, 2026
  3. flutter-triage-bot commented on Jul 1, 2026

    @flutter-triage-bot

    This issue is missing a priority label. Please set a priority label when adding the triaged-accessibility label.

  4. added
    P2Important issues not at the top of the work list
    on Jul 8, 2026
  5. added a commit that references this issue on Oct 9, 2026
    1f55bfa
  6. github-actions commented on Oct 23, 2026

    @github-actions

    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 -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)triaged-accessibilityTriaged by Framework Accessibility team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions