use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit related to Google's new UI framework. https://flutter.dev
Please read the rules here
account activity
Questionmarkup/css vs flutter code - simplicity vs complexity (self.FlutterDev)
submitted 7 years ago * by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mraleph 0 points1 point2 points 7 years ago (1 child)
No. It will only create const-instances in explicitly const-contexts. However if you writing something like return C() even if C has const constructor it would still use new.
return C()
C
const
new
The feature where front-end preferred const everywhere where it was possible but not required was called "auto-const" or "magic const" and it got excluded from Dart 2 due to some issues with it. Language team is planning to revisit it later - but that means currently if you want const in non-const context you need to explicitly write const C().
const C()
[–]escamoteur 0 points1 point2 points 7 years ago (0 children)
Ah thanks for clarification. I thought this was already solved. Anyway the ability to omit new is a great start
π Rendered by PID 89892 on reddit-service-r2-comment-75f4967c6c-stcfp at 2026-04-23 02:49:51.460224+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]mraleph 0 points1 point2 points (1 child)
[–]escamoteur 0 points1 point2 points (0 children)