You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PreferredSize child should be last widget on constructor invocations #128178
import'package:flutter/cupertino.dart';
import'package:flutter/material.dart';
voidmain() {
runApp(constMainApp());
}
classMainAppextendsStatelessWidget {
constMainApp({super.key});
@overrideWidgetbuild(BuildContext context) {
returnconstCupertinoApp(
home:Scaffold(
appBar:PreferredSize(
child:Text(''), // this suggestion can move to next once we change the constructor,
preferredSize:Size.fromHeight(80.0),
),
),
);
}
}
Screenshots or Video
2023-06-04.01-33-26_Trim.mp4
Logs
No response
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.10.3, on Microsoft Windows [Version 10.0.19045.2965], locale en-US) • Flutter version 3.10.3 on channel stable at C:\Tools\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f92f44110e (2 days ago), 2023-06-01 18:17:33 -0500 • Engine revision 2a3401c9bb • Dart version 3.0.3 • DevTools version 2.23.1[√] Windows Version (Installed version of Windows is version 10 or higher)[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at I:\SDK • Platform android-33, build-tools 33.0.1 • ANDROID_HOME = I:\SDK • Java binary at: I:\Software Instlaion system Files\android_studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted.[√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.3) • Visual Studio at I:\visual_studio_installation • Visual Studio Community 2022 version 17.3.32825.248 • Windows 10 SDK version 10.0.19041.0[√] Android Studio (version 2021.3) • Android Studio at I:\Software Instlaion system Files\android_studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)[√] IntelliJ IDEA Community Edition (version 2022.3) • IntelliJ at I:\Software Instlaion system Files\intelIj\IntelliJ IDEA Community Edition • Flutter plugin version 71.3.6 • Dart plugin version 223.8214.16[√] VS Code • VS Code at C:\Users\WCS\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.17.0[√] Connected device (4 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2965] • Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.129 • Edge (web) • edge • web-javascript • Microsoft Edge 113.0.1774.57[√] Network resources • All expected network resources are available.• No issues found!
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.
Is there an existing issue for this?
Steps to reproduce
While writing
PreferredSizewidget on VS Code, the auto-complete happen based on constructor which is currently` look likeIt raises a warning(suggestion) from
flutter_lints:^2.0.0Also, if we press
ctrl+spacefor suggestion, it showsExpected results
I was expecting
childas the last widget, which removes the lint warning and devs can depend on suggestion and doesn't need to change it manually.Actual results
Currently It suggest like
Code sample
Code sample
Screenshots or Video
2023-06-04.01-33-26_Trim.mp4
Logs
No response
Flutter Doctor output
Doctor output