Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: stacked_generator:StackedFormGenerator #1156

Open
MadSkillsDeveloper opened this issue Mar 22, 2025 · 0 comments
Open

[bug]: stacked_generator:StackedFormGenerator #1156

MadSkillsDeveloper opened this issue Mar 22, 2025 · 0 comments

Comments

@MadSkillsDeveloper
Copy link

Describe the bug

I am having the following issue when using FormView annotation:

`This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:

line 250, column 52 of .: Expected an identifier.

250 │ this.formValueMap..addAll({ValueKey: }),
│ ^

[SEVERE] Failed after 30.3s
Failed to update packages.
`

My FormView:

const List dropdownItems = [
StaticDropdownItem(value: 'street', title: 'Street'),
StaticDropdownItem(value: 'box', title: 'Box'),
StaticDropdownItem(value: 'flat', title: 'Flat'),
StaticDropdownItem(value: 'farm', title: 'Farm'),
StaticDropdownItem(value: 'plot', title: 'Plot'),
];

@FormView(fields: [
FormDropdownField(items: dropdownItems),
FormTextField(
name: "line1", validator: AddressValidator.validateAddressLine1),
FormTextField(name: "line2"),
FormTextField(
name: "suburb", validator: AddressValidator.validateAddressSuburb),
FormTextField(name: "city", validator: AddressValidator.validateAddressCity),
FormTextField(
name: "zipCode", validator: AddressValidator.validateAddressZipCode)
])

What operating system do you use?

Windows

Information about the installed tooling

$ flutter doctor -v
[√] Flutter (Channel stable, 3.29.0, on Microsoft Windows [Version 10.0.26100.3476], locale en-ZA) [976ms]
• Flutter version 3.29.0 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 35c388afb5 (6 weeks ago), 2025-02-10 12:48:41 -0800
• Engine revision f73bfc4522
• Dart version 3.7.0
• DevTools version 2.42.2

[√] Windows Version (11 Pro 64-bit, 24H2, 2009) [6.6s]

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [7.5s]
• Android SDK at C:\Program Files (x86)\Android\android-sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = C:\Program Files (x86)\Android\android-sdk
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
• All Android licenses accepted.

[√] Chrome - develop for the web [474ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.3) [473ms]
• Visual Studio at D:\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.13.35828.75
• Windows 10 SDK version 10.0.22621.0
X The current Visual Studio installation is incomplete.
Please use Visual Studio Installer to complete the installation or reinstall Visual Studio.

[√] Android Studio (version 2024.3) [32ms]
• Android Studio at C:\Program Files\Android\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 21.0.5+-12932927-b750.29)

[√] VS Code (version 1.97.2) [30ms]
• VS Code at C:\Users\Lulamile Gaji\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.106.0

[√] VS Code (version 1.98.0-insider) [29ms]
• VS Code at C:\Users\Lulamile Gaji\AppData\Local\Programs\Microsoft VS Code Insiders
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available) [523ms]
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 15 (API 35) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.3476]
• Chrome (web) • chrome • web-javascript • Google Chrome 134.0.6998.89
• Edge (web) • edge • web-javascript • Microsoft Edge 134.0.3124.83

[√] Network resources [860ms]
• All expected network resources are available.

! Doctor found issues in 1 category.

Steps to reproduce the issue

run flutter pub run build_runner build --delete-conflicting-outputs

Expected behavior

No response

Screenshots

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant