Is there an existing issue for this?
Steps to reproduce
Specific code that cause stuck (no window appear) flutter run in debug mode (release mode run fine)
-v mode show, program stopped at this line
[ +4 ms] <- compile org-dartlang-app:/web_entrypoint.dart
code that cause this eror.
// ...
author: json['author'] != null ? ((json) => (name: json['name']))(json['author']) as BlogPageBlogEntriesAuthorRecord : null,
// ...
I don't know which part is wrong, ternary or closure or Record code or type or variable name.
Here is full function, it parse json into Record.
BlogPageRecord parseBlogPage(Map<String, dynamic> json) {
return (
blog: ((json) => (
blogId: json['blogId'],
title: json['title'],
entries: json['entries']
.map<BlogPageBlogEntriesRecord>((json) => (
authorId: json['authorId'],
body: json['body'],
entryId: json['entryId'],
title: json['title'],
author: json['author'] != null ? ((json) => (name: json['name']))(json['author']) as BlogPageBlogEntriesAuthorRecord : null,
// author: null,
) as BlogPageBlogEntriesRecord)
.toList(),
))(json['blog']) as BlogPageBlogRecord,
);
}
If I change to author: null, it boots, so problem must be there.
typedefs are here for reference
typedef BlogPageRecord = ({
BlogPageBlogRecord blog,
});
typedef BlogPageBlogRecord = ({
String blogId,
String title,
List<BlogPageBlogEntriesRecord> entries,
});
typedef BlogPageBlogEntriesRecord = ({
String authorId,
String body,
String entryId,
String title,
BlogPageBlogEntriesAuthorRecord? author,
});
typedef BlogPageBlogEntriesAuthorRecord = ({
String name,
});
Expected results
Browser window open and application is shown.
Actual results
flutter run stuck and application does not start (no browser window open)
Code sample
Screenshots or Video
Logs
Flutter Doctor output
Doctor output (I am not using iOS or android for now, only web(chrome) on Linux)
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.5, on Ubuntu 22.04.2 LTS 5.19.0-45-generic, locale C.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
[✓] Chrome - develop for the web
[✗] Linux toolchain - develop for Linux desktop
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
[✓] VS Code (version 1.79.2)
[✓] Connected device (2 available)
[✓] Network resources
! Doctor found issues in 3 categories.
Is there an existing issue for this?
Steps to reproduce
Specific code that cause stuck (no window appear) flutter run in debug mode (release mode run fine)
-v mode show, program stopped at this line
code that cause this eror.
I don't know which part is wrong, ternary or closure or Record code or type or variable name.
Here is full function, it parse json into Record.
If I change to author: null, it boots, so problem must be there.
typedefs are here for reference
Expected results
Browser window open and application is shown.
Actual results
flutter run stuck and application does not start (no browser window open)
Code sample
Screenshots or Video
Logs
Flutter Doctor output
Doctor output (I am not using iOS or android for now, only web(chrome) on Linux)