Sign in

Abhishek Doshi

Dart has some really powerful compression algorithms which we can use! Let’s say you have a long JSON or a string that you want to store in your local storage. Suppose the JSON is of 1300000 bytes, so when you store it in your local storage, it will occupy almost 1.3 MB of memory. Though it’s not much, a use case can occur where your data can be of 100s of MB. So, you can compress your data before storing it in local storage. Let’s see how we can do that using GZip!

So here I created a long…

One should always follow the practice to write clean, refactored and well-documented code! It’s not just for the benefit of you, but it also helps others who check your code.

Dart has some of the in-built lint rules which allow developers to write proper clean code. Projects created with flutter create using Flutter version 2.3.0-12.0.pre or newer are already enabled to use the latest set of recommended lints. Projects created prior to that version can upgrade to it with the instructions in this guide. However, you can always make the rules stricter by specifying your custom lint rules!

There are…

State Management is one of the most important concepts in Flutter. It’s not mandatory to use any State Management techniques, but it is obviously advisable to follow and maintain a good architecture so that you can access your data in any layer of the widget tree!

BLoC is one such State Management technique that is handy and easy to understand. If you are a complete beginner for BLoC, feel free to check out my other 2 articles on BLoC!

Recently, Felix Angelov (the creator of BLoC) published a new and more simplified version of the package. This article is totally…

Let’s say we have 2 pages, Page1 and Page2 in our app. So whenever Page2 pops, we want to print something on Page1. In normal flow, there’s no method from Widget Lifecycle that is called when the next screen is poped! (Feel free to check out Widget Lifecycle in Flutter to know more)!

RouteAware class provides the following methods which we can extend:

  • didPop()
    When we pop the current screen, didPop method is called.
  • didPopNext()
    If you have extended Page1 with RouteAware, and if Page2 is popped so that Page1 is visible now, didPopNext is called. …

Knowing the basics of Flutter is the most important and worthy investment you can do while learning Flutter. You should always know how the widgets are created, rendered, updated and destroyed as it will help you to understand your code! This is also one of the favourite questions of interviewers😉!

Flutter has 2 types of widgets, Stateless Widget and Stateful Widget.
Stateless Widgets
are rendered only once when the widget is loaded. We can’t rebuild a Stateless widget based on any user events or changes. (Have a look at different types of trees in futter!)
However, on the other hand, Stateful…

Do you wish to check whether the user’s keyboard is visible or not? Let’s see how you can do that without using any packages!

Many times we have scenarios where we need to check whether the keyboard is visible or not. Maybe we want to change UI based on keyboard visibility or want to perform some functionality!

One of the ways is definitely to use any packages like flutter_keyboard_visibility, flutter_keyboard_size, keyboard_service, and many more are available. But, to use a package for such a simple functionality is not a good idea! …

We can have the images in our assets folder, but how to load them faster? Here’s a secret function in Flutter that helps us to do so — precacheImage()

Many times it happens (especially in Flutter Web) that your images from local assets take a lot of time to load and render on your screen!

This is not good for the user’s perspective especially if the image is the background image of your screen. If the image is any component in your screen, we can still show shimmer or something so that the user gets to know that image is…

Rebuilding UI is the most important concept that we will always need to use. But sometimes rebuilding your widget tree will be costlier! Let’s see how you can use ValueNotifier to rebuild the UI!

Flutter has been booming a lot for a few years now due to its flexibility, multi-platform support and of course, open-source! setState is the most common way that we use to rebuild our widget tree to reflect the changes. But, using setState to rebuild the widget tree can be costlier sometimes. Hence there are different state management concepts like provider, BLoC, GetX, etc. …

Nature is so beautiful with different types of trees, flowers, etc. Even Flutter is beautiful and has 3 types of trees 😉! Let’s see what are those and how do they affect development.

Flutter framework has 3 different trees that are responsible for app rendering and different things under the hood! The 3 trees that make the Flutter framework beautiful and strong are:

  • Widget Tree
  • Element Tree
  • Render Object Tree

All these trees have different responsibilities but work on a common goal: Fast UI rendering and development! Let’s see them one by one.

Confused about different positions in a company? Are you starting your career and curious about what your seniors or other people do? Let’s check it out then!

IT industry is one of the most growing industries in this world with thousands of employees working on hundreds of projects! However, there are always different people in a team with different positions and responsibilities assigned to them. Let’s see some of the major positions you may encounter when you join or work in an IT company.

1. Intern or Trainee:

An Intern or Trainee is someone who is not yet ready for corporate-level work and needs…

Abhishek Doshi

Flutter Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store