#1 Flutter + Dart Tips

Bhavik Makwana
Flutter Community
Published in
2 min readJan 30, 2019

There’s always some small detail in every programming language or framework that once discovered, makes it a lot easier to work with.

This article is all about the Dart and Flutter tips, I will be writing an article like this every month. My aim is to cover all the Flutter and Dart Tips I have discovered. All tips shared can be found in my “FlutterDartTips” repo on Github:

Feel free to check it all out.

Below are this month's Tips:

1. Using null-aware operators

While checking for null values in the Dart, use null-aware operators to help you reduce the amount of code required to work with references that are potentially null.

2. Using ListView.separated()

Want to add the separator in your Flutter ListView?.
Go for the ListView.separated();.

The best part about separated is it can be any widget.😃
Check out the below image for the sample code.

3. Do not explicitly initialize variables to null.

Adding = null is redundant and unneeded.

This is it for this month.
See you at the end of the Next month.

If you have some cool tips in your mind and want to share with the Folks around the world, Fork the repository and Make a PR.

If you found this article helpful Click on 👏 as many time you can.
Have a Fluttery delicious day.

--

--

Bhavik Makwana
Flutter Community

Flutter Enthusiast | Google Certified Associate Android Developer | Speaker for flutter | Android Dev | Flutter Dev