Reels on Instagram are being consumed and created by a lot of people across the globe. We all love to share the reels without friends or family. This sharing was limited to only Instagram until the reel downloader came into the picture. Many people on the play store or app store are posting applications that help to download the reels. That’s when this package comes in to allow the developers to create more such applications.
The objective of this package is to encourage the developers to create more apps where they focus on the Frontend part as this package covers the whole backend one would need. And as it\'s based on Flutter 2.0 and Null Safety, it can be used for Android, iOS, Linux, and desktop-based applications.
After the ban of TikTok and other Chinese mobile applications in India in January 2021, Instagram launched a new feature named Reels. Reels allowed creators and influencers on Instagram to create 30 seconds to 1-minute videos, where they can create short content to promote their products or influence people. Reels immediately gained popularity among the youth. People started sharing reels among their friends and family members on Instagram. Sharing to other platforms or downloading to the user’s devices was not possible.
Soon developers got the idea of making apps that allowed people to download the reels on their devices so that they can share them elsewhere or on any other social media platforms like WhatsApp or Snapchat. As Android holds a huge marketplace, initially applications were developed and uploaded to the Play Store. Later they were uploaded to the App Store too. Now after the launch of Flutter in 2017 building apps for the Android and iOS platforms became easier. Flutter allowed developers to write a single code that allowed them to build mobile applications for various other platforms. Flutter works around widgets and allows the developer to create or use existing packages that just make production faster. Packages allow the developer to use them to avoid rewriting the same code again and again.
As Flutter is an open source, people started contributing to it by creating packages that helped the Flutter community to grow. Insta Reel Downloader is just one of the packages that allow developers to create applications using which people can download reels on their respective devices. Now the developer just needs to download the package just as any other package and all the backend needed to download the reel will be accessible to them and they can focus only on the Frontend and connect it with the backend.
Flutter was introduced by Google in 2017. It is simple and easy to manage yet has a high-performance UI framework that is based on Dart language. Flutter is chosen to be Google’s application framework for its next-generation operating system. Rendering is fast in Flutter which reduces the time in the development cycle, as it renders directly on the OS’s canvas rather than through the native framework. It is based on widgets that are laid upon one another to create an application. Flutter introduced Hot Reset and Hot Restart, which made it easier to make changes in the application. As it’s all widgets, Flutter doesn’t build the whole application again after the changes, it just builds the widget where the changes were made. Hot restart allows the developer to make such changes fast and Hot reset allows the developer to reset the whole application which is used in case a major change is made inside the application. Flutter allows the creation of cross-platform applications which means a single code written can be used to build applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the Web. After the introduction of Flutter 2.0, null safety was introduced which was not used earlier that often.
III. METHODOLOGY AND DISCUSSION
I have created a package “flutter_reel_downloader” in Flutter that allows the developer to use it to create applications that help users to download reels to their devices. As many people want to download the reels they love, demand for such applications has increased. This encourages developers to create more such applications. The common part of these applications is that the backend work is the same. Only the Frontend or UI is different in all these applications. As Flutter allows the use of packages, this backend work can be reduced. This package has all the needed backend code which the developer needs, so now their only focus would be on Frontend and connecting them both. By using my package the time taken in creating the backend will be reduced and the time given to the frontend would be more.
My package consists only of the backend code the application would need to download the reels from the link provided by the user. This package is created on an HP Pavilion laptop with 8GB RAM using Android Studio as IDE on windows OS and testing was done on an Android device only.
The developer needs to search the package “flutter_reel_downloader” on “pub.dev”, Flutter’s official website for packages and check out the latest version available. Now open up the terminal in Android Studio and paste the following command.
After importing, let’s initialize variables and call this backend which can be later used to connect it with the frontend.
Flutter provides us with a new feature of initState that allows us to change the state of the application after the particular work is completed. In Figure (Fig.5.) We have two states, one where the download is getting initialized and the other being download Reels that allows the input in the form of text and then stores it in the variable “s” which was only written to get a print to check if the link we passed was correct or not. Under initialize Downloader, the downloader package is used to take care of the downloading part. For this part, the developer needs to create a text field where the user can enter the link and after that link will be stored in the variable named “myvideourl” as stated in Figure(Fig.6.).
In Figure (Fig. 6,) async and await can be seen as it will fetch the data online which can take time, or maybe sometimes errors can also occur. So, here a variable “myvideourl” is initialized which will be taking the values from the text field where the link is provided. After the await, the URL which was stored in “myvideourl” variable would be called. The download package used will store the downloaded file in the download location inside the SD card. The notification showing the download progress is set to be true that allows the user to see the progress and after completing it is set to be false which means the downloading has stopped.
Now setting up of the backend is all completed and now for testing this package, a simple UI is created that only has an appBar,
TextField and a clickable button. Here, the value passed inside the TextField is reelController which will take the input of the link. The elevated button is used to change the state as downloading or not downloading. While downloading a circular progress indicator is shown in the center.
I would like to thank my family for always believing in and supporting me throughout my life.
As people are sharing more and more reels, they are looking for such applications that help them to download reels from Instagram. This package will help developers to create such applications for various platforms and also they can use them in their existing flutter applications.