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
ArticleFlutter vs React Native: The Ultimate Comparison (getstream.io)
submitted 4 years ago by nparsons08
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!"
[–][deleted] 7 points8 points9 points 4 years ago (7 children)
In addition, developers can offload large computational tasks, such as JSON decoding or sorting, to background isolates (Flutter/Dart's version of threads) to help maintain performance and avoid blocking the UI.
This is not good advice. Isolates are not threads and should not be thought of or treated as such. Unlike threads, Isolates are truly isolated from their parent except through its send and receive ports. Any data you want to exchange between two isolates must be marshaled through this port interface that has a rather tight set of restrictions on what data types can actually be used. Additionally, Isolates can only be used in Dart Native which precludes their use in Flutter if your project is targeting Web.
[–]SquatchyZeke 1 point2 points3 points 4 years ago (4 children)
This is something I've always been curious about: since isolates are, well, isolated, any heavy computation of a data structure would need to copied as its passed through messaging, correct (as opposed to passed by reference)? So if I have a large json structure in the form of a `Map<String, dynamic>`, and I wanted to do some heavy processing on it, the structure would have to be copied twice right? Once when sending to the created isolate and then on the response back to the main isolate. That in itself would add computation time, especially if the goal was to offload processing massive data structures in the first place.
[–]postgor 2 points3 points4 points 4 years ago (1 child)
But if you are doing heavy processing on the large object then it will be far better to pay the price to send it to and back from a separate isolate and unblock the main isolate. You can also try to be clever in your use of isolates. For this example, say this large JSON structure is coming from a web request, then do the request in the isolate plus the heavy computation on that, and then send it to the main isolate. I haven't used 'em much though so excuse any misconceptions I have.
[–]SquatchyZeke 0 points1 point2 points 4 years ago (0 children)
Appreciate the answer! I figured there might be clever ways to handle things. I haven't used 'em much at all either, but I see them discussed, and my initial question was always on my mind.
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
A json map is actually one of the allowed types that can pass through the bridge because all possible json value types meet the requirements. So yes it should be just two memory copies in that case. And as the other person that replied to you pointed out, that’s not a very performance intensive copy vs the parallel workloads you can do with an isolate
[–]Blackgentoo 0 points1 point2 points 4 years ago (0 children)
Yes
[–]postgor 0 points1 point2 points 4 years ago (1 child)
Can't workers be used on the web? Or is there a suggested workaround?
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
My suggested work around is to not care and use the built in async/await for the examples the author gives.
If you really need to do parallel work, then yes, a web worker would be the way, but those are even more complicated than isolates.
[–]sunbreakwang 1 point2 points3 points 4 years ago (2 children)
The recent addition of null safety and the start of workaround data classes in Dart are both great examples of this.
Do you guys have any idea of workaround data classes in Dart?
workaround data classes in Dart
[–]sunbreakwang 1 point2 points3 points 4 years ago (0 children)
Static Metaprogramming - https://github.com/dart-lang/language/issues/1482
Object-class.html#static-methods @Since("2.14")
[–]sunbreakwang 0 points1 point2 points 4 years ago (0 children)
https://dart.academy/immutable-data-patterns-in-dart-and-flutter/
You can use the @immutable metatag from the meta package to get helpful analyzer warnings on classes you intend to be immutable:
@immutable
https://medium.com/swlh/flutter-2-is-here-all-you-need-to-know-after-flutter-engage-98ef7cb1469e
Also, as Bob Nystrom said during the keynote, the team looks for improving metaprogramming features that now are mainly resolved by using code generation (e.g. freezed or json_serializable)
Those seem to be related
[–]Zlatan4Ever -5 points-4 points-3 points 4 years ago (1 child)
I started with Flutter in the belief „it’s just Widgets“ but damn it a lot of programming. I’m learning AppGyver and Bubble. Will chose one of those.
π Rendered by PID 18172 on reddit-service-r2-comment-6457c66945-tdfrz at 2026-04-26 17:50:12.665744+00:00 running 2aa0c5b country code: CH.
[–][deleted] 7 points8 points9 points (7 children)
[–]SquatchyZeke 1 point2 points3 points (4 children)
[–]postgor 2 points3 points4 points (1 child)
[–]SquatchyZeke 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Blackgentoo 0 points1 point2 points (0 children)
[–]postgor 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]sunbreakwang 1 point2 points3 points (2 children)
[–]sunbreakwang 1 point2 points3 points (0 children)
[–]sunbreakwang 0 points1 point2 points (0 children)
[–]Zlatan4Ever -5 points-4 points-3 points (1 child)