Our top liked article of the week dives into reversing a character string in Dart. We'll explore the step-by-step process, covering methods such as 'Reverse Using Split and Join', 'Reverse Using Runes' and 'Reverse Using Code Units'. This invaluable guide, a hit amongst Flutter app developers, breaks down this process efficiently for any Dart framework.
https://medium.flutterdevs.com/reverse-a-string-in-dart-85d80216c890
#flutter #gpt #automated
https://medium.flutterdevs.com/reverse-a-string-in-dart-85d80216c890
#flutter #gpt #automated
❤1🥰1
The first in a series of articles on advanced flutter questions has just been published. At the moment, only Dart related questions are covered:
- Why is dart a perfect choice for flutter?
- What are the differences between const and final?
- Differences between local, static and global variables in Dart
- What is Dart VM?
- What is Dart Runtime?
- What are the Dart compilers?
- How does asynchrony work in Dart?
- What is the Await keyword?
- What about timers in Dart? How do I delay an operation?
- Is it possible to make the event loop hang? How do I fix it?
https://lazebny.io/flutter-advanced-one/
- Why is dart a perfect choice for flutter?
- What are the differences between const and final?
- Differences between local, static and global variables in Dart
- What is Dart VM?
- What is Dart Runtime?
- What are the Dart compilers?
- How does asynchrony work in Dart?
- What is the Await keyword?
- What about timers in Dart? How do I delay an operation?
- Is it possible to make the event loop hang? How do I fix it?
https://lazebny.io/flutter-advanced-one/
Michael Lazebny
Advanced Flutter Interview: Part one
Explore advanced Flutter interview topics, including Dart's role in Flutter, variables, asynchrony, DartVM, and more in this comprehensive guide.
👍2🔥2
How do I unload an event loop in Dart? It is quite a common situation for us to have APIs like Future<List<T>>.
Imagine a method that returns a list of users. What you do there is parse the json into a dart list and then somehow convert it into a typed list of models. This conversion to models can be done lazily. Just change the API to Stream<T> and you will get the idea. You can put all the elements in the event loop to process them asynchronously.
Here is the link to the working flutter app, which gives you an example of how to do this:
https://gist.github.com/hawkkiller/932140079adfdcab2cfdd4b0292bb50a
#dart #flutter #async #eventloop #tip
Imagine a method that returns a list of users. What you do there is parse the json into a dart list and then somehow convert it into a typed list of models. This conversion to models can be done lazily. Just change the API to Stream<T> and you will get the idea. You can put all the elements in the event loop to process them asynchronously.
Here is the link to the working flutter app, which gives you an example of how to do this:
https://gist.github.com/hawkkiller/932140079adfdcab2cfdd4b0292bb50a
#dart #flutter #async #eventloop #tip
Gist
Event Loop unloading
Event Loop unloading. GitHub Gist: instantly share code, notes, and snippets.
👍2
Dive into the advanced topic of Flutter's factory constructors in this popular medium article of the week. Learn when to use them, how they differentiate from static methods, and understand their relevance in implementing singleton patterns, deserialization, subclass instantiation, and more for a more readable code.
https://itnext.io/dart-flutter-what-are-factory-constructors-advanced-knowledge-9770ef723394
#flutter #gpt #automated
https://itnext.io/dart-flutter-what-are-factory-constructors-advanced-knowledge-9770ef723394
#flutter #gpt #automated
Medium
Dart/Flutter: What Are Factory Constructors? (Advanced Knowledge)
You will learn how factory constructors work and when to use them.
👾2
In the second part of advanced questions I will cover these themes:
- Pattern matching
- Immutability
- Isolates, heap, isolate groups
- GC
- Errors & exceptions - differences and proper handling
- What is a widget, different types
- Inherited Widget, its implementation and advantages
- State lookup, find ancestor in the tree
- Keys: local, global
- Pattern matching
- Immutability
- Isolates, heap, isolate groups
- GC
- Errors & exceptions - differences and proper handling
- What is a widget, different types
- Inherited Widget, its implementation and advantages
- State lookup, find ancestor in the tree
- Keys: local, global
❤3👍2
I'm introducing exciting polls on various topics, mainly about Dart & Flutter. I think you'll like it.
Today published a post about Dart GC. I wrote about the garbage collection process and the tricks it employs.
Linkedin
Sign Up | LinkedIn
500 million+ members | Manage your professional identity. Build and engage with your professional network. Access knowledge, insights and opportunities.
👍3
👍3
Difference in behavior of single-subscription and broadcast streams.
Anonymous Quiz
25%
Broadcast stream buffer all events
13%
Single subscription stream buffer all events
62%
Both buffer, the difference being that broadcast stream allows multiple listeners.
🔥1
Mobile Tech
Photo
What will this code emit?
Anonymous Quiz
19%
Ben Ben Mike Mike
20%
Ben Mike Ben Mike
28%
Mike
2%
Nothing
6%
Mike Mike
26%
Ben Mike
👍5
What is needed to override to compare objects in Dart?
Anonymous Quiz
79%
Both == an hashCode
14%
Only ==
6%
Only hashCode
👍2🤔1
What will happen if you call runApp() again in Flutter?
Anonymous Quiz
10%
App will crash
27%
Nothing - Flutter will ignore it
63%
Current root widget will be replaced with new one.
👍3
What is the worst case time complexity of inserting into an array?
Anonymous Quiz
8%
O(1)
25%
O(logN)
67%
O(n)
👍2
👍1
👍3