Aswin Gopinathan ļ£æ šŸ‡®šŸ‡³ Profile picture
Software Engineer @PhonePe ā€¢ iOS Developer ā€¢ Speaker šŸŽ¤ and i write blogs āœļø ā€¢ Learning SwiftUI
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