Mobile Tech
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…
I have created SVG vs Iconfont Performance Benchmark
It tracks the rasterization, which is the process of rendering UI objects as pixels on the screen.
The icon font is much better on the GPU thread. SVG's complexity leads to expensive rasterization, which easily overwhelms the GPU and causes stutters.
You can check the full benchmark here https://github.com/hawkkiller/noscript_iconfont_benchmark
Note that I tested on my MacBook, which is extremely performant. Testing on a low-end Android device may provide even more insights.
I also tried to add some readmes for better understanding.
#flutter #flutterdev
It tracks the rasterization, which is the process of rendering UI objects as pixels on the screen.
The icon font is much better on the GPU thread. SVG's complexity leads to expensive rasterization, which easily overwhelms the GPU and causes stutters.
You can check the full benchmark here https://github.com/hawkkiller/noscript_iconfont_benchmark
Note that I tested on my MacBook, which is extremely performant. Testing on a low-end Android device may provide even more insights.
I also tried to add some readmes for better understanding.
#flutter #flutterdev
🔥9👍5
There is an easy way to speed up Flutter tests in CI.
If you have a large test suite, use sharding. It distributes the number of tests between multiple shards, so you can create multiple parallel jobs in CI.
#flutter #FlutterDev
If you have a large test suite, use sharding. It distributes the number of tests between multiple shards, so you can create multiple parallel jobs in CI.
#flutter #FlutterDev
👍8👏1
Do not hardcode paths to assets; use the path generator!
The generator ensures that assets exist and removes the possibility of a typo.
Explore what fits your needs, but I would recommend flutter_gen/spider.
#flutter #flutterdev
The generator ensures that assets exist and removes the possibility of a typo.
Explore what fits your needs, but I would recommend flutter_gen/spider.
#flutter #flutterdev
👍8❤5
It is better to wait before updating Flutter to the latest stable version.
After a new stable, there are usually multiple fixes published – 3.32 had 8 patches!
I recommend staying 1 stable version behind the latest release. This ensures that you won't be affected by regressions and new bugs.
#flutter #flutterdev
After a new stable, there are usually multiple fixes published – 3.32 had 8 patches!
I recommend staying 1 stable version behind the latest release. This ensures that you won't be affected by regressions and new bugs.
#flutter #flutterdev
👍16
Is your layout ready for RTL languages?
A common mistake is using a fixed left/right EdgeInsets or Alignment.
Instead, use their directional counterparts. They provide logical start and end properties, allowing the UI to adapt automatically.
#flutter #flutterdev
A common mistake is using a fixed left/right EdgeInsets or Alignment.
Instead, use their directional counterparts. They provide logical start and end properties, allowing the UI to adapt automatically.
#flutter #flutterdev
👍15❤3
I updated the article about monorepos with some new information!
https://lazebny.io/dart-flutter-workspaces/
https://lazebny.io/dart-flutter-workspaces/
Michael Lazebny
Dart & Flutter Monorepos: Pub Workspaces and Melos
Simplify Dart & Flutter development with a monorepo using Pub Workspaces, reusable noscripts, and release automation with Melos.
👍5
🚨 I have a few article ideas that I'm interested in:
- Creating an FFI Dart package with Rust for image upscaling using build hooks.
- Eliminating pigeons with native bindings (ffigen+jnigen).
- What you can achieve with the built-in Flutter SDK for bottom sheets. I recently worked on this in a company, so it should be helpful as bottom sheets are a complex topic.
What do you think? Share your opinions in the comments.
If you have other interesting ideas, please share as well :)
- Creating an FFI Dart package with Rust for image upscaling using build hooks.
- Eliminating pigeons with native bindings (ffigen+jnigen).
- What you can achieve with the built-in Flutter SDK for bottom sheets. I recently worked on this in a company, so it should be helpful as bottom sheets are a complex topic.
What do you think? Share your opinions in the comments.
If you have other interesting ideas, please share as well :)
❤9👍1
Mobile Tech
🚨 I have a few article ideas that I'm interested in: - Creating an FFI Dart package with Rust for image upscaling using build hooks. - Eliminating pigeons with native bindings (ffigen+jnigen). - What you can achieve with the built-in Flutter SDK for bottom…
Bottom sheet won the poll 🤣😭
So the order is like this:
- bottom sheet features/limitations
- native bindings with ffigen/jnigen
- dart package with rust [build hooks]
So the order is like this:
- bottom sheet features/limitations
- native bindings with ffigen/jnigen
- dart package with rust [build hooks]
👍11👎1
Is there anyone from Poland/Portugal looking for a Senior position with Flutter?
My team is looking for senior engineer:
https://jobs.eu.lever.co/olx/3d7022fc-54b1-4917-a956-9d981c49f815
if you’d like to know some details, please DM me
My team is looking for senior engineer:
https://jobs.eu.lever.co/olx/3d7022fc-54b1-4917-a956-9d981c49f815
if you’d like to know some details, please DM me
jobs.eu.lever.co
OLX - Senior Mobile Engineer
Join Our Team as a Senior Mobile Engineer! Join our Mobile App Platform team, working remotely from Poland or Portugal. As part of our 1,000+ tech team across multiple locations, you’ll collaborate with engineers, SREs, and product teams to build scalable…
🔥8❤2
Hey all!
There is a great 7-minute video about how Flutter merged Platform and UI threads recently. It also slightly covers jnigen!
Recommend watching for everyone!
https://www.youtube.com/watch?v=miW7vCmQwnw
There is a great 7-minute video about how Flutter merged Platform and UI threads recently. It also slightly covers jnigen!
Recommend watching for everyone!
https://www.youtube.com/watch?v=miW7vCmQwnw
YouTube
The great thread merge
Dive deep into Flutter's thread merge, a fundamental shift in its engine design aimed at enhancing native interoperability. Craig breaks down the roles of the UI and Raster threads, introduces the native platform thread, and explains how integrating Dart…
🔥4👍3
This media is not supported in your browser
VIEW IN TELEGRAM
Just tried out the new analyzer plugin API!
It is so powerful, but very simple and seamlessly integrates with dart analyze and immediately shows issues in the IDE.
I created a simple lint that prohibits hardcoded color. See https://github.com/hawkkiller/analyzer_plugin_sample
It is so powerful, but very simple and seamlessly integrates with dart analyze and immediately shows issues in the IDE.
I created a simple lint that prohibits hardcoded color. See https://github.com/hawkkiller/analyzer_plugin_sample
🔥16👍4❤1
Media is too big
VIEW IN TELEGRAM
🚀 Happy Friday! Sharing a cool update
I created fast_image, which uses Rust's image library. This library uses new Dart feature, Build Hooks.
To upscale from Full-HD to 4k, my library requires ~500ms, while Dart's image package requires ~6000ms (and with less quality algorithm)
I created fast_image, which uses Rust's image library. This library uses new Dart feature, Build Hooks.
To upscale from Full-HD to 4k, my library requires ~500ms, while Dart's image package requires ~6000ms (and with less quality algorithm)
🔥27👍2❤1
New cool proposal for import syntax in Dart, which is already accepted
https://github.com/dart-lang/language/blob/main/accepted/future-releases/unquoted-imports/feature-specification.md
https://github.com/dart-lang/language/blob/main/accepted/future-releases/unquoted-imports/feature-specification.md
👍18🔥6❤3
🔥8
This media is not supported in your browser
VIEW IN TELEGRAM
Implemented cool sliding animation with Animated Switcher!
80 👍 and will share a gist! 😄
Initially implemented this with wolt_modal_sheet, but found some issues and unoptimized code, so decided to make on my own.
80 👍 and will share a gist! 😄
Initially implemented this with wolt_modal_sheet, but found some issues and unoptimized code, so decided to make on my own.
3👍89🔥5🥰2