Enhancing Image Rendering Efficiency
Handling large images often leads to excessive consumption of device memory. To tackle this issue, DevTools offers valuable insights into identifying images that are too large.
To optimize, consider setting 'cacheWidth' or 'cacheHeight' properties on your images. This approach decodes and stores images in memory at a designated size.
There is also a ResizeImage class in the SDK that can be used to resize the image.
See how the GSkinner team utilized AppImage in the Wonderous project, offering a real-world example of these techniques in action - https://buff.ly/46sE71y
#FlutterDev #Flutter #Performance
Handling large images often leads to excessive consumption of device memory. To tackle this issue, DevTools offers valuable insights into identifying images that are too large.
To optimize, consider setting 'cacheWidth' or 'cacheHeight' properties on your images. This approach decodes and stores images in memory at a designated size.
There is also a ResizeImage class in the SDK that can be used to resize the image.
See how the GSkinner team utilized AppImage in the Wonderous project, offering a real-world example of these techniques in action - https://buff.ly/46sE71y
#FlutterDev #Flutter #Performance
π9
π4
Do not use Future.wait in Dart!
When dealing with multiple futures simultaneously, it is important to put them all into an event loop. A common approach is to use Future.wait, but it has drawbacks:
- If a future fails, the returned future will complete with an error and waste time executing other futures (unless eagerError is set).
- You can't handle events and errors individually.
- Type information is lost.
A better alternative is to use streams, which allow you to process futures individually and handle errors without interrupting execution or losing data.
If you need ordered data, consider using an await-based approach, as shown. This allows for concurrent processing of each future while preserving types and error handling.
There is also a new wait API provided by Records, but there is no eagerError equivalent, so streams and standard futures remain the recommended solution for concurrent, robust future processing.
When dealing with multiple futures simultaneously, it is important to put them all into an event loop. A common approach is to use Future.wait, but it has drawbacks:
- If a future fails, the returned future will complete with an error and waste time executing other futures (unless eagerError is set).
- You can't handle events and errors individually.
- Type information is lost.
A better alternative is to use streams, which allow you to process futures individually and handle errors without interrupting execution or losing data.
If you need ordered data, consider using an await-based approach, as shown. This allows for concurrent processing of each future while preserving types and error handling.
There is also a new wait API provided by Records, but there is no eagerError equivalent, so streams and standard futures remain the recommended solution for concurrent, robust future processing.
π₯13π5π€3π1πΎ1
Media is too big
VIEW IN TELEGRAM
Use extent to optimize scrolling
If all elements have the same length along their main axis, it is recommended to set the
#Flutter #Performance
If all elements have the same length along their main axis, it is recommended to set the
extent
or utilize prototypeItem
. This will prevent the scrolling engine from laying out these widgets.#Flutter #Performance
π8π₯4
Today I will work on user service. I will define general architecture, layers and folder structure in #Golang.
https://www.youtube.com/watch?v=9f8Rgj-GxPo
https://www.youtube.com/watch?v=9f8Rgj-GxPo
YouTube
Stoic Way #2 - Implementing User Service architecture
Today, we will implement the initial "user service" architecture in Golang. We will add all the needed libraries and create our first http server.
π4π₯4β€2π2
Added database section to sizzle starter template documentation!
https://sizzle.lazebny.io/storage/database/about/
https://sizzle.lazebny.io/storage/database/about/
π13
Some interesting (and hard) questions:
- How does setState result in a new frame?
- What's the rendering pipeline?
- How does repaint boundary work?
- How to implement offline-first?
- What is declarative navigation?
- How do you initialize dependencies?
- How does setState result in a new frame?
- What's the rendering pipeline?
- How does repaint boundary work?
- How to implement offline-first?
- What is declarative navigation?
- How do you initialize dependencies?
π8
Working on small, but interesting article about overlays and popups.
It will be about OverlayPortal, OverlayController and other widgets to make alignment & positioning ease.
inspired by this one: https://plugfox.dev/layer-link/
It will be about OverlayPortal, OverlayController and other widgets to make alignment & positioning ease.
inspired by this one: https://plugfox.dev/layer-link/
π8π₯5
Tomorrow we will build something interesting! Hope to see you there.
https://www.youtube.com/watch?v=blJzdukYZwg
https://www.youtube.com/watch?v=blJzdukYZwg
YouTube
Stoic Way #3 - Auth, Responses and Exceptions
On this stream we will implement a solution for unified error and success responses. We will setup the proper configs for JWT secrets. Futhermore, we will create a simple Dockerfile for our service. If we have any time left we will design the database tablesβ¦
π6π₯4β€2
Mobile Tech
Tomorrow we will build something interesting! Hope to see you there. https://www.youtube.com/watch?v=blJzdukYZwg
Guys, Iβd like to ask you for some feedback or suggestions!
What you liked on streams and what you didnβt.
Or maybe, you have some ideas
What you liked on streams and what you didnβt.
Or maybe, you have some ideas
π5
Popups in Flutter the right way!
I'm asking for some feedback - Do you find this article of your interest, is it written in clear language? Thanks!
https://lazebny.io/popups-in-flutter/
I'm asking for some feedback - Do you find this article of your interest, is it written in clear language? Thanks!
https://lazebny.io/popups-in-flutter/
Michael Lazebny
Popups in Flutter
Master popups in Flutter: dropdowns, overlays, menus, and more. Learn how to position popups correctly and manage overflow.
π11
Next article will be about exceptions.
- how to handle them correctly
- backend errors
- stacktrace / throwing / rethrowing
- comparison to either
- how to handle them correctly
- backend errors
- stacktrace / throwing / rethrowing
- comparison to either
π₯24π9
Please open Telegram to view this post
VIEW IN TELEGRAM
π24π₯°8π5πΎ3β€1π1π1
2D scrolling infinite canvas: https://x.com/definev2/status/1735319830641963284?s=46&t=dWA1m7fMpzIgC8FgRKo4XQ
π14