Ale 💙
banner
alesalv.bsky.social
Ale 💙
@alesalv.bsky.social
Code philosopher at Elisa, with an empirical thought for #Android and an anecdotal for #Flutter . And father, like never before.
Flutter dev after a week coding web 👇👇👇

#flutter #flutterdev #dart #javascript #typescript #dadjokes
April 25, 2025 at 7:20 AM
... and same goes for pub.dev

pub.dev/packages/min...
March 25, 2025 at 7:43 AM
A huge thanks to all 18 of you who took the time and went to star ⭐️ #minimal on github, it really means a lot to me, like to any os publisher 🔥
If you're here, come say hi 👋

github.com/alesalv/mini...

#flutter #flutterdev
March 25, 2025 at 7:39 AM
Minimal 2.0.1 is out! 🔥
Now the example app showcases a basic TODOs list, thanks to @testeurmaniak.bsky.social 's feedback and detailed reasoning, so I increased the tests for the disposable dynamics

Would you like me to write some posts about how to use it?

#flutter #flutterdev #minimal
March 15, 2025 at 10:56 AM
😅😂😇👇
March 11, 2025 at 1:05 PM
"Optimization for rebuilds based only on changes of single properties are not the responsebilty of the data layer"

notifier is not part of the data layer, at all. Below it there are repositories and data sources (data layer). Notifiers are what I used to call controllers (UI layer) 👇
March 11, 2025 at 6:06 AM
I would love to see how they handle a notifier passed to two views, like I show in the Minimal example app 👇
March 10, 2025 at 6:06 AM
This this this so much this! 👇👇👇
🔥🔥🔥🔥

#javascript #typescript #flutter #futterdev #dart
March 6, 2025 at 2:43 PM
select() which avoid unnecessary rebuilds.
At this point our async operation is concluded, and our UI is back in sync with the fetching of the data asked by the user.
Most of the user's triggered operations will be async, but with this architecture you have UDF (unidirectional data flow) so ...

⬇️
March 4, 2025 at 7:48 PM
4 the notifier sets its state to 6 pokemon (s6) and at the same time stops the loading. Pokemon are parsed here, and we're still doing any operation asynchronously, so the parsing can take even 1 minute it doesn't matter from UI pov

⬇️

github.com/alesalv/flut...
March 4, 2025 at 7:40 PM
2 you trigger the loading (l 29) so the UI shows a loading indicator, and then delegate to the pokemon repository the manipulation of the data set, in this case from 5 polemon to 6. In case of error, the UI shows an error indicator.
This is done asynchronously, so ...

⬇️

github.com/alesalv/flut...
March 4, 2025 at 7:33 PM
always 👇👇👇
February 26, 2025 at 6:36 AM
Bonus and optional, to optimize rebuilds

3.2 (Optimized) Rebuild the UI only when part of the state changes

That's all folks! 🔥🔥🔥
February 9, 2025 at 11:08 AM
4 Access the notifier upon user's actions

⬇️
February 9, 2025 at 11:08 AM
3 Rebuild the UI when state changes

⬇️
February 9, 2025 at 11:08 AM
2 Create a notifier to hold your UI state

⬇️
February 9, 2025 at 11:07 AM
State Management in 4 Steps

1 Create an immutable UI state

⬇️
February 9, 2025 at 11:07 AM
It comes with a runnable example 👇👇👇

The classical counter app demonstrates basic state management. This shows off non disposable and disposable notifiers.
A morphing widget. This shows off two views using the same notifier, autodispose, and state selection
February 9, 2025 at 11:07 AM
I just published Minimal, a minimal state management package for Flutter Architecture Components, based on the MVN (Model-View-Notifier) pattern

pub.dev/packages/min...

#flutter #flutterdev

MVN neologism 🔥 by @romanjaquez.bsky.social ©®
February 9, 2025 at 11:05 AM
This is what I wrote 👇👇👇 I didn't write anything nasty, neither I insulted anyone
November 27, 2024 at 2:50 PM
Meanwhile in Finland 😅👇👇👇
November 25, 2024 at 5:38 AM
This can be seen here instead. I quote:
"If user input prompts a change in a model, the controller will signal the model to change, but the model is then responsible for telling its views to update"
This is why we need to have a state management solution, to tell the UI to rebuild upon state changes
November 22, 2024 at 4:11 AM
This can be seen here 👇👇👇
In MVVM you need to have a binder, a mechanism to make the data binding happen. In old Android xml was the binder
November 22, 2024 at 4:07 AM
This morning for me here 😅
November 20, 2024 at 1:28 PM
Do you mean something like this? 😅👇👇👇
November 20, 2024 at 8:59 AM