I’ve been watching the events unfolding in #Ukraine with great concern.

And it's clear that many people need humanitarian aid, *right now*.

If you have the means to do so, donate your money (I have).

This thread lists a few non-profits helping people during this crysis. 👇
If you haven't already seen this, here's display of much needed, true leadership from the Ukranian president:

Here's a great article by @GergelyOrosz about the impact of this war on the Tech World:

For historical context, this lecture from 2015 makes some good points about the causes and consequences of the Ukraine crisis:

And here's a very interesting thread from @filiphracek with more historical context still (and ways you can help):

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Andrea Bizzotto 💙

Andrea Bizzotto 💙 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @biz84

Mar 1
WidgetsBindingObserver is very handy for listening to changes to:

- routing events
- device orientation
- platform settings (text scale factor, brightness, locale, etc.)
- app lifecycle events

Here's how to use it to hide sensitive info when the app goes to the background. 🧵 Image
How to set it up?

- add the WidgetsBindingObserver *mixin* to one of your classes (generally a State subclass)
- register the observer inside initState (and dispose it when done) Image
Then, just override the methods for the changes you want to keep track of.

In this case, we listen to app lifecycle changes and update a "foreground" flag via setState(). Image
Read 6 tweets
Feb 23
What are some VSCode extensions you can use to speed-up your Flutter workflow?

Here's a thread with my favourites! 🧵
When creating model classes, you'll often needs methods such as:

• copyWith()
• toString()
• toJson()
• fromJson()
• toMap()
• fromMap()
• == operator
• hashCode

Use the Dart data class generator to create them all in one go!

Link: marketplace.visualstudio.com/items?itemName…
If you use Riverpod, you'll quickly get tired of typing out all your providers and consumers by hand.

The Flutter Riverpod Snippets extension makes this a lot easier!

Link: marketplace.visualstudio.com/items?itemName…
Read 10 tweets
Feb 10
How do we apply Domain-Driven Design to exception handling?

I've been experimenting with some techniques and would love your feedback about this thread. 🧵

First of all, let's establish some goals: 👇
To define all the domain-specific exceptions, sealed unions come to hand.

Here's how we may generate Auth and Database exception types using Freezed:
Then we can define one *global* function that does two things:

- run the Future<T> that is given as an argument inside a try/catch block
- map all 3rd-party exceptions to our own exception types (and throw them)
Read 14 tweets
Feb 9
Domain-Driven Design helps us write complex software.

At the heart of it lies the *domain model*, which is a conceptual model that incorporates both behavior and data.

Sounds complicated?

Let's explain with an example. 🧵
Suppose we want to build an eCommerce app.

To better understand this domain, we need to figure out:

- the entities we care about and their relationships
- the behaviour (or business logic) for manipulating them

The end result may look like this:
In Dart, we can represent each entity as a simple model class.

As we define this, it helps to think about all the properties that we need to show in the UI:
Read 7 tweets
Jan 26
The default way of accessing localized strings inside your widgets is to use the `AppLocalizations` class.

However, using the `!` operator everywhere is not good practice.

And it would be nice to have some more "lightweight" syntax.

A thread. 🧵 Image
One issue we have is that `AppLocalizations.of(context)` returns a *nullable* object.

But at runtime this will never be null, as long as we call it inside a *descendant* of MaterialApp (which is always the case).

So what can we do? Image
Dart extensions to the rescue!

We can define a LocalizedBuildContext extension with a `loc` getter variable defined like so: Image
Read 6 tweets
Jan 21
When building non-trivial apps, following a *structured workflow* can bring great benefits and avoid many pitfalls.

Rather than diving straight into the code, here's a 6 step workflow that you can follow.

Thread. 🧵
1. Design your app (part 1)

Design all the screens that will be in your app.

You can use Sketch, Figma, Adobe XD, or even draw them by hand.

This will help you think about the most logical UI flows before diving into the code.

Here's an example from my website: 👇
1. Design your app (part 2)

This is also a great chance to define stylesheets including a color palette, typography, paddings etc.

This will:

- make your designs much more consistent
- make your app look much nicer
- save you time down the line
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(