Mobile Tech
1.15K subscribers
92 photos
8 videos
6 files
138 links
Michael Lazebny's blog about @dart and @flutter
lazebny.io
Download Telegram
Absolute record today ❀️
πŸ”₯11❀6
🀩🀩🀩 100 STARS on Sizzle Starter !
Please open Telegram to view this post
VIEW IN TELEGRAM
❀11πŸ”₯10πŸ’©3🀩2πŸ‘1
How does #Flutter draw a frame?

The process can be initiated by several sources - setState, render object, system, or engine.

When you call setState, it marks the element as dirty and asks the engine (C++) for a frame via FFI. Later, when the engine is ready, it calls the WidgetsBinding.drawFrame callback.

The drawFrame iterates through the element tree and rebuilds dirty elements. If dirty elements change their size, color, or orientation (generally something that render objects are interested in) - render objects are marked as dirty.

Then the framework performs layout and painting.

Finally, the scene (or frame) is built and sent to the painting engine.
πŸ”₯3πŸ‘2
Does each setState causes repaint?
Anonymous Quiz
43%
Yes
57%
No
😁14
Ian Hickson left Google.

Lead that worked on flutter last 11 years.

That’s not a good sign for Google, especially for their techniques in managing projects.

https://ln.hixie.ch/
😒9🀯4
Five Questions for Middle Flutter Developer

How will you adapt UI to large/small screens?

Ephemeral vs app state.

How do you implement state management?

Tell about β€œConstraints go down, sizes go up”.

How will you communicate with Native platforms?

#flutter #tip
πŸ‘13
I am planning on doing a live broadcast on YouTube this Saturday or Sunday. What’s the most convenient time for you?
Anonymous Poll
19%
Morning (9-11)
25%
Day (13-16)
77%
Evening (16-19)
I will start my side project that involves creating custom backend and cross platform app.

I will tell about the idea and features.

Then, we will design authentication & authorization.

Technologies: Go, Flutter, Kubernetes.
πŸ”₯16πŸ₯°3❀2
Mobile Tech
Started :) https://www.youtube.com/watch?v=gYHgreP2mGQ
Huge thanks to everybody who was there :)
Next time we will start writing #golang code.

Focusing more on preparing, being concise and structured!
❀10πŸ”₯3
https://joebubna.github.io/Cora/documentation/v2/dependency-injection/overview/

Good article about Dependency Injection and Service Locator
πŸ‘8❀2
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
πŸ‘9
Imperative Paradigm is about
Anonymous Quiz
37%
What to achieve
63%
How to achieve
πŸ‘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.
πŸ”₯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 extent or utilize prototypeItem. This will prevent the scrolling engine from laying out these widgets.

#Flutter #Performance
πŸ‘8πŸ”₯4