Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Steps to reproduce
Run the code sample.
Expected results
Probably an error message, but one that actually has detail.
Actual results
I get an assertion that tells me to file a bug.
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(
Directionality(
textDirection: TextDirection.ltr,
child: Column(
children: [
Stack(children: [Positioned(top:0,child: SizedBox())]),
],
),
),
);
}Screenshots or Video
No response
Logs
Flutter Doctor output
Doctor output
[✓] Flutter (Channel main, 3.33.0-1.0.pre-1039, on macOS 14.6.1 23G93 darwin-arm64, locale en-US) [1,230ms]
• Flutter version 3.33.0-1.0.pre-1039 on channel main at /Users/user/dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 70cdc0c933 (2 hours ago), 2025-07-21 12:09:22 -0400
• Engine revision 70cdc0c933
• Dart version 3.10.0 (build 3.10.0-15.0.dev)
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets
[✗] Android toolchain - develop for Android devices [116ms]
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[!] Xcode - develop for iOS and macOS (Xcode 16.2) [1,044ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
✗ Unable to get list of installed Simulator runtimes.
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [7ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed) [6ms]
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
[✓] VS Code (version 1.101.2) [6ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.114.0
[✓] Connected device (2 available) [5.7s]
• macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.158
[✓] Network resources [499ms]
• All expected network resources are available.
! Doctor found issues in 3 categories.Reacted by Tirth Patel
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Activity
tirth-patel-nc commentedon Jul 22, 2025
hi @treeplate, thanks for the report. are you suggesting an improvement to the message?
treeplate commentedon Jul 22, 2025
yes
tirth-patel-nc commentedon Jul 23, 2025
Positioned requires its Stack parent to have bounded constraints, which Column doesn't provide by default. So this is an implementation error, labelling it as a proposal to improve the error message.
Logs
#78796 (comment)
Rushikeshbhavsar20 commentedon Aug 6, 2025
Hi! I’d love to contribute to this issue.
I plan to improve the assertion error message in RenderStack to clearly explain that the Stack needs bounded constraints (like wrapping it in a SizedBox or Expanded).
Please let me know if I can be assigned or if there’s any guidance. Thanks!
tirth-patel-nc commentedon Aug 6, 2025
feel free to pick up, it's all yours. thanks for contributing.
Rushikeshbhavsar20 commentedon Aug 6, 2025
Could you please take a quick look and let me know if the message looks good?
If it's fine, I’ll go ahead and raise the PR.
Thanks again!
Improve Stack widget error message for bounded constraints (#173352)
Improve Stack widget error message for bounded constraints (flutter#1…
Improve Stack widget error message for bounded constraints (flutter#1…
github-actions commentedon Sep 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.Improve Stack widget error message for bounded constraints (flutter#1…
Improve Stack widget error message for bounded constraints (flutter#1…
Improve Stack widget error message for bounded constraints (flutter#1…
Improve Stack widget error message for bounded constraints (flutter#1…