Skip to content

Dev tools not showing children of any StatefulWidget #1197

@bsutton

Description

@bsutton

When using Dart Dev Tools Flutter Inspector to view an widget hierarchy the tree no longer displays children of a Stateful widgets.

image

I've just done a full re-install of vs-code and android studio.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Linux, locale en_AU.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Community Edition (version 2018.3)
[✓] Connected device (1 available)

• No issues found!

As you can see the HolidaysPage includes a Container:

class HolidaysPage extends StatefulWidget {
  static final RouteName routeName = RouteName('/userholidayspage');

  HolidaysPage({Key key}) : super(key: key);

  @override
  _HolidaysPageState createState() => _HolidaysPageState();
}

class _HolidaysPageState extends State<HolidaysPage> {
  final Leave leave = ServiceLocator.leave;

  @override
  Widget build(BuildContext context) {
    return Container(width: 0, height: 0);
  }
}

The Container is visible in the render tree but not the widget tree.
This makes it rather hard to select nested widgets in order to analyse layout issues.

Not certain what additional details I need to supply?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3issues we think are valid but not importantbugSomething isn't workingreproduce to verifyIssues that need to be reproduced to verify that they still exist.screen: inspector

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions