An iterator-like interface for stream values.
Allows more elegant and flexible solutions than default "for"
https://api.flutter.dev/flutter/dart-async/StreamIterator-class.html
#tip #dart #stream
Allows more elegant and flexible solutions than default "for"
https://api.flutter.dev/flutter/dart-async/StreamIterator-class.html
#tip #dart #stream
๐4
Declarative Status Bar Overlay Color in Flutter
Ever struggled with imperative SystemChrome API? See this short guide to make this process neat.
Ever struggled with imperative SystemChrome API? See this short guide to make this process neat.
Linkedin
Michael Lazebny on LinkedIn: #dart #flutter #declarative #appbar
Declarative Status Bar Overlay Color in Flutter
Have you ever struggled with switching between colors of the status/navigation bar on Android? There is an imperative solution to use SystemChrome.setSystemOverlayUiStyle, but there is an even better declarativeโฆ
Have you ever struggled with switching between colors of the status/navigation bar on Android? There is an imperative solution to use SystemChrome.setSystemOverlayUiStyle, but there is an even better declarativeโฆ
๐4
Todayโs post is about DI
Linkedin
#dart #flutter #systemdesign #architecture #dependencyinjection | Michael Lazebny
Dependency Injection: Game Changer in Software Design
Have you ever wondered why top software experts are so excited about Dependency Injection (DI)?
It's not just a fancy term - it's a core design pattern that is changing the way we build and manage software.โฆ
Have you ever wondered why top software experts are so excited about Dependency Injection (DI)?
It's not just a fancy term - it's a core design pattern that is changing the way we build and manage software.โฆ
๐ฅ9๐3
How to efficiently transform data using Codecs in Dart. Read in today's post :)
https://www.linkedin.com/feed/update/urn:li:activity:7130419429242224642/
https://www.linkedin.com/feed/update/urn:li:activity:7130419429242224642/
Linkedin
#dart #flutter #converter #json #utf8 #serialization | Michael Lazebny
How to effectively serialize data in Dart & Flutter?
There is a very sophisticated way:
Dart has a built-in package called "dart:convert" that includes codecs for UTF8, json, base64, ASCII, and other formats that you may already be using.
These codecsโฆ
There is a very sophisticated way:
Dart has a built-in package called "dart:convert" that includes codecs for UTF8, json, base64, ASCII, and other formats that you may already be using.
These codecsโฆ
๐ฅ6
Avoid these dart libraries. Briefly about their drawbacks and better alternatives.
https://lazebny.io/avoid-these-dart-libraries/
#flutter #flutterdev #dart
https://lazebny.io/avoid-these-dart-libraries/
#flutter #flutterdev #dart
Michael Lazebny
Avoid These Dart Libraries
This article lists popular Dart and Flutter libraries that are not recommended, including Riverpod, Get, Get_it, Hive, and Stacked.
๐15๐ฅ6๐ค4๐2๐1๐ฏ1
Modern Monorepo management in Dart and Flutter
https://lazebny.io/modern-monorepo-management
#dart #flutter #flutterdev
https://lazebny.io/modern-monorepo-management
#dart #flutter #flutterdev
Michael Lazebny
Modern Monorepo Management with Pub Workspaces and Melos in Dart
Efficiently manage Flutter/Dart monorepos using Pub Workspaces and Melos, with examples for dependency management and workflow automation.
๐6โ1โคโ๐ฅ1
Rust is an amazing language for FFI in Dart
All you need to do is define the extern C function, run cbindgen to generate a C header file, and then run ffigen, which generates safe Dart bindings.
Here is how I implemented upscale using Rust's "image" crate, which is 50x faster than dart's "image" package.
I think this is not the best solution and if you know how to improve it, it would be greatly appreciated! :)
#dart #rust #ffi
All you need to do is define the extern C function, run cbindgen to generate a C header file, and then run ffigen, which generates safe Dart bindings.
Here is how I implemented upscale using Rust's "image" crate, which is 50x faster than dart's "image" package.
I think this is not the best solution and if you know how to improve it, it would be greatly appreciated! :)
#dart #rust #ffi
๐12โค3
When updating dependencies in a Pub Workspace, use "dart pub upgrade," which automatically resolves to the correct version and updates it in every package.
#flutter #FlutterDev #dart #tip
#flutter #FlutterDev #dart #tip
๐6
This media is not supported in your browser
VIEW IN TELEGRAM
I created a Shimmer animation in Flutter in 100 lines without libraries.
It is performant and minimizes rebuilds, based on a CustomPaint, a LinearGradient, and a Transform.
https://gist.github.com/hawkkiller/2ed40b43d6372fc322080e0c8ce76521
#dart #flutter #flutterdev
It is performant and minimizes rebuilds, based on a CustomPaint, a LinearGradient, and a Transform.
https://gist.github.com/hawkkiller/2ed40b43d6372fc322080e0c8ce76521
#dart #flutter #flutterdev
๐20
Don't use SVGs for Icons in Flutter. There are better and more performant ways.
Rendering SVG requires several time-consuming operations: reading from memory, parsing the SVG to a binary format, parsing the binary format to Dart structures, and only then rendering.
Instead, opt for icon fonts, similar to the Icons class in Flutter. A Flutter engine processes all the fonts during startup and makes them available throughout the whole app lifecycle. The performance of rendering an icon font is the same as rendering text.
#dart #flutter #flutterdev
Rendering SVG requires several time-consuming operations: reading from memory, parsing the SVG to a binary format, parsing the binary format to Dart structures, and only then rendering.
Instead, opt for icon fonts, similar to the Icons class in Flutter. A Flutter engine processes all the fonts during startup and makes them available throughout the whole app lifecycle. The performance of rendering an icon font is the same as rendering text.
#dart #flutter #flutterdev
๐6๐ฅ3๐1