Flutter Application using Docker Commands

kartik Bhardwaj
4 min readAug 22, 2021

Flutter is an open-source UI software development kit created by Google. It is used to develop cross platform applications for Android, iOS, Linux, Mac, Windows.

Flutter works:-

Flutter use Dart because is strongly typed Object Oriented programming language. And it has features of Ahead of time compilation and Just in Time Compilation. Ahead of time compilation make Flutter SDK and Dart eligible to generate Native ARM Code which can be compiled on Android and iOS.

Flutter also provides developers the ability to view widgets in a reactive style. For the record, Flutter isn’t the first one to do this but Flutter is the only mobile SDK that offers a reactive look without the need for a JavaScript bridge. Moreover, Dart comes with a repository of software packages to enhance the capabilities of applications. For example, it offers several packages that help to access Firebase so that developers can create serverless applications. Another package allows access to the Redux data warehouse or facilitates access to platform services and equipment such as cameras.

Quick code development

Flutter creators wanted to invent a technology with the quickest opportunity to deliver a great-performing, cross-platform mobile application. The following features allow this:

  • Hot reload. Flutter’s hot reloading helps save time while developing by letting the developer see the applied changes in real-time. This capability helps developers be significantly more efficient and productive. Flutter’s hot reload works better than competitors’ similar features. It allows the developer to pause code execution, make changes to the code, and continue the code from the same place. This greatly speeds up development and allows more experimenting.

Hot Reload Operation

  • Widgets. One of the most significant benefits of Flutter is how it uses ready-made widgets. This ensures that Flutter offers a consistent model for development and design. Widgets are Google-based, so they are high code quality and perform better than other open-source frameworks. As most of them are extremely customizable, they save developers’ time like no other framework. In addition to the major layout widgets, Flutter widgets follow both the Material and Cupertino looks, which is a huge advantage.
  • Minimal code and access to native features. Flutter lets developers use Dart, which is compiled directly into the ARM code of mobile devices and helps not only to speed up applications, it allows them to launch quicker also.
  • Flutter helps make developers’ lives easier through its third-party integrations and native codebase. With Flutter, developers can access native features.

That’s what makes quick code development possible, thus the whole process faster, easier and less disturbing.

Creating an app which help user to run all the docker commands like:

docker images
docker ps
docker run
docker rm -f
docker start
docker stop

Step-1: Starting the httpd, Stopping the firewall and disabling the selinux:

*systemctl stop firewalld
* systemctl start httpd
* setenforce 0

Step-2: Add the apache to docker group.

*vim /etc/group
*docker:x:<someumber>:apache
Above is Important for permission purpose.

Step-3: Adding apache to Sudoers config file.

*vim /etc/sudoers
*apache ALL:(ALL) NOPASSWD : ALL

#!/usr/bin/python3 import cgi
import subprocess
import time
print("content-type: text/html")
print()
k = cgi.FieldStorage()
cmd = k.getvalue("x")
o = subprocess.getoutput(cmd)
print(o)

Step-5: Copy paste the main.dart into your Flutter Project

Go to Github
*Place the Downloaded file into your project
And Enjoy the app

--

--

kartik Bhardwaj

Learning in Linux World Summer Internship, Good in ML-OPS, Machine Learning/Deep Learning, Python and Much more..