Flutter Task3: Linux Integration App

Prasuk Jain
3 min readOct 31, 2020

Task Description:

I have to create an app that can run any Linux command using API and the output will be saved in Google Firestore database. From Firestore, the output will print on the screen.

Linux has long been the basis of commercial networking devices, but now it’s a mainstay of enterprise infrastructure. Linux is a tried-and-true, open-source operating system released in 1991 for computers, but its use has expanded to underpin systems for cars, phones, web servers and, more recently, networking gear.

For creating such kind of app which is connected to google firestore we have to add out app with google firestore. For doing this you can visit the following website for step by step guidence.

After that we have to provide some dependencies which are used to connect our app to google firebase after running the app. These dependencies includes,

cloud_firestore: ^0.14.0+2
firebase_core: ^0.5.0
firebase_auth: ^0.18.0+1

we can install these dependencies from pub.dev website. we have to add these dependencies inside pubspec.yaml file.

I have created home screen , registration screen and terminal screen. Home screen ask the user to register in our app. Registration screen is used get the details from the user like his email id and password. these details will store in our google firestore. After getting the output from user he will be redirected to the terminal screen. Terminal screen is integrated with my linux server.

main.dart:

home is my initial route which is my home screen.

home.dart:

the home screen of my app looks like this.

When user click on the register button he will be directed to the registration page of my app. where user has to provide his informations.

Registration Page:

After giving the informations and clicking on the submit button, the user email and password store in the google firestore and then he will be redirected to terminal screen.

Terminal Screen:

In terminal screen user can run any linux command and get the output on the screen. this output comes from the python file which is in my linux server.

Python File:

User can run any linux command like date , cal , ifconfig , cat command etc. when user run the cat command “cat web.py” , the output will show on the screen like this.

All the command outputs store in the google firestore with command name and command output.

This is the video of my entire app working:

Here is the github link for the code:

THANK YOU

--

--