Aswin Gopinathan 🇮🇳💙 Profile picture
Software Engineer @PhonePe • iOS Developer • Speaker 🎤 and i write blogs ✍️
Dec 22, 2021 14 tweets 5 min read
Ever thought about using Dart for your server-side code?

I call it "Dart-as-a-backend".

This 🧵 talks about various Dart packages that you can use to write your server-side code using Dart.

#flutter #flutterdev 1. shelf

It's a tooling package published by the Dart team. Shelf makes it easy to create a basic web server and parts of a web server.

It is a Web server middleware for Dart.

pub.dev/packages/shelf
Dec 20, 2021 11 tweets 3 min read
This thread consists of all the 🧵s i have written on various concepts in Dart and Flutter!

I will update this as i go on…

Anything for this wonderful community that has given me everything 💙

#flutter #flutterdev A 🧵 on Future v/s Streams
Dec 20, 2021 14 tweets 4 min read
You have used em' but you wanna know how it works.

A brief introduction to Closures in Dart 💙

A thread 🧵 So, how do you define the onTap callback for GestureDetector?

Something like this right 👇🏻
Dec 19, 2021 23 tweets 6 min read
A 🧵 on my favourite 20 CLI commands for Dart and Flutter Developers!

#flutter #flutterdev 1. Create a Dart application
Dec 18, 2021 19 tweets 5 min read
Final vs Const

A 🧵on the battle of Immutability ⚔️

#flutter #flutterdev Immutability means you cannot change the data stored in a variable during the entire life time of your app.

But why do we use immutable variables ?
Dec 17, 2021 19 tweets 5 min read
Everything you need to know about Widget Lifecycle in Flutter

A thread 🧵

#flutter #flutterdev There are two types of Widgets in Flutter:

1. Stateless Widget : They do not change their state throughout the lifetime of your application. They are like a constant widget.

2. Stateful Widget: They are dynamic, they change their state based on the External Interactions.
Dec 15, 2021 18 tweets 4 min read
Mockito + Unit Testing in Flutter 101

This thread talks about Verify and Stubbing using Mockito🧵

#flutter #flutterdev If you are pretty new to Unit Testing, I suggest you read through my previous thread on Unit Testing:

Dec 14, 2021 19 tweets 5 min read
Unit Testing in Flutter 101

A mega thread 🧵

#flutter #flutterdev Unit Testing is the most important testing method, that is usually performed by the developer.

Unit Testing tests each individual modules (method, function or a class) for its proper functioning.
Dec 13, 2021 7 tweets 3 min read
In my latest tweet, I talked about how you can prevent multiple calls to your future methods using a variable approach.

What if I say, there is one more efficient approach to it!

Thanks to @DmytroGladkyi for telling me about it

Read on to know about it 👇🏻

#flutterdev #flutter The approach is using the AsyncMemoizer class.

To use the class, import the following package:
Dec 13, 2021 10 tweets 3 min read
When working with Futures and FutureBuilders, it is recommended not to execute the Future methods inside the FutureBuilder.

I learned it the hard way!

Read on to know why 👇🏻

#flutter #flutterdev Every time your UI refreshes (eg: using a setState), the future method is run again, which can turn out to be very expensive!

Sometimes this could be helpful, but most of the times it’s a curse for the application.

So how can you fix it ?

👇🏻
Dec 12, 2021 8 tweets 2 min read
Future v/s Streams

A restaurant analogy thread 🧵👇🏻

#flutter #flutterdev Imagine you go to a restaurant and your date gives you two options:

1. Takeout and eat at your home

2. Find a table and eat there itself

Well these options in the Flutter world means:

1. Future

2. Stream