Flutter, Dart, and Andriod Studio are specifically used for mobile application development.
When you install Flutter, you also get the Dart SDK installed on your system. This means that you can use the Dart programming language to write Flutter apps without needing to install the Dart SDK separately.
Flutter relies heavily on Dart for its development, and many of the key Flutter concepts, such as widgets, are implemented using Dart classes and objects. By using Dart, Flutter can take advantage of features like hot reload, which allows you to see changes to your app in real-time as you make code edits, and compile-time optimizations that can improve the performance of your app.
Dart is an integral part of the Flutter development environment and is included with the Flutter SDK. If you’re developing Flutter apps, you’ll be using Dart for your coding.
Visual Studio Code is used because it is a lightweight IDE that will be good for Flutter App development.
Android Studio is installed because Flutter will need some of its components for Android application development. Further, the emulators that are bundled with Android Studio SDK can be used for emulating Android devices to test the applications developed using Flutter and those emulators can be accessed from VS Code environment also. That is why we will need Android Studio.
The Hardware Requirements
The following are the hardware requirements for installing Flutter, VS Code, and Android Studio on Debian:
- Flutter:
- Disk space: The Flutter SDK requires approximately 600 MB of disk space for the installation. However, you may need additional space for storing the Android SDK and other development tools.
- RAM: Flutter can run on systems with as little as 4 GB of RAM, but 8 GB or more is recommended for optimal performance.
- CPU: A multi-core CPU is recommended, but a dual-core CPU should suffice.
- VS Code:
- Disk space: VS Code requires approximately 200 MB of disk space for the installation.
- RAM: VS Code can run on systems with as little as 1 GB of RAM, but 4 GB or more is recommended for optimal performance.
- CPU: A dual-core CPU is recommended, but a single-core CPU should suffice.
- Android Studio:
- Disk space: The Android Studio installation requires approximately 2-3 GB of disk space, but you may need additional space for storing the Android SDK and other development tools.
- RAM: Android Studio can run on systems with as little as 4 GB of RAM, but 8 GB or more is recommended for optimal performance.
- CPU: A quad-core CPU is recommended, but a dual-core CPU should suffice.
The specific hardware and storage requirements may vary depending on the size and complexity of your projects and the components needed for your application.
Flutter
Flutter is a mobile app SDK (Software Development Kit) created by Google that allows developers to build high-performance, visually attractive, and natively compiled applications for mobile, web, and desktop platforms, using a single codebase. Flutter uses the Dart programming language, which was also developed by Google and comes with its own set of libraries, widgets, and tools for developing applications.
One of the key benefits of Flutter is that it enables developers to build beautiful, responsive, and fluid user interfaces (UIs) quickly and easily, with the help of its extensive library of customizable widgets. Flutter also has a hot-reload feature, which allows developers to see the results of changes they make to the code in real-time, without having to restart the app. This makes the development process faster and more efficient.
Flutter also has several other features that make it a popular choice for mobile app development, including its ability to integrate with other programming languages and platforms, its strong community support, and its ability to create apps that run seamlessly on multiple platforms. Overall, Flutter is a powerful and flexible tool for building high-quality mobile, web, and desktop apps, and it is becoming increasingly popular among developers around the world.
Dart
Dart is an object-oriented, garbage-collected programming language created by Google in 2011. It was designed to be fast, efficient, and scalable, and was initially intended to be used for building web applications. However, with the introduction of the Flutter SDK, Dart has gained popularity as a programming language for building mobile and desktop applications as well.
Dart is similar in syntax to other programming languages like Java and C++, but it also has several unique features that set it apart. For example, Dart has a concise and easy-to-read syntax, which makes it easy to learn and use. It also supports both just-in-time (JIT) and ahead-of-time (AOT) compilation, which makes it fast and efficient for running code on different platforms.
One of the key features of Dart is its support for asynchronous programming, which allows developers to write code that runs in the background while the main thread of the application continues to execute. This is particularly useful for building mobile and web applications, where responsiveness and performance are critical.
Overall, Dart is a versatile and powerful programming language that is well-suited for building a wide range of applications, from web and mobile apps to server-side applications and beyond. Its clean syntax, support for asynchronous programming, and strong type system make it a popular choice for developers around the world.
It is possible to use Flutter and Dart without any IDE environment. But, for better development, we may use Flutter and Dart under Visual Studio Code. For the installation of Visual Studio Code, one may follow a procedure like the below one (without the ns-3 configuration part)
Visual Studio Code
Visual Studio Code, often abbreviated as VS Code, is a free and open-source code editor developed by Microsoft. It is widely used by developers for a variety of programming languages and platforms, including web development, mobile development, and cloud computing.
VS Code offers a number of features that make it a popular choice among developers, including a highly customizable user interface, support for debugging and testing code, and built-in support for popular version control systems like Git.
One of the key features of VS Code is its extension marketplace, which allows developers to add new features and functionality to the editor by installing extensions. There are thousands of extensions available in the marketplace, including syntax highlighting for new languages, code snippets, and integration with popular development tools like Docker and Kubernetes.
VS Code also includes a range of productivity features, such as IntelliSense, which provides smart code completion suggestions based on the context of the code, and the ability to split the editor window into multiple panes for viewing and editing multiple files simultaneously.
Overall, Visual Studio Code is a versatile and powerful code editor that is well-suited for a wide range of programming tasks. Its highly customizable interface, an extensive marketplace of extensions, and a range of productivity features make it a popular choice among developers around the world.
Install Flutter Extension on VS Code
Installing the Dependencies
$ sudo apt update
$sudo apt install curl file git unzip xz-utils zip libglu1-mesa
$ sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev
Android Studio
Install Flutter
Download Flutter
Download Flutter From the following link:
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.11-stable.tar.xz
Extract it
$ cd /home/yourhome
$ tar xvf ~/Downloads/flutter_linux_3.7.11-stable.tar.xz
The following screenshot shows the successful installation of Flutter under the home folder.
Export the Flutter Path
Add the following line in the .bashrc file and restart the shell.
export PATH="$PATH:/home/jason/flutter/bin"
Test Flutter Version
$ flutter --version
The following screenshot shows the output of the command “flutter –version”
Diagnose Flutter Installation
$ flutter doctor
The following output of the command “flutter doctor” shows some of the problems with the installation.
Set Environment Variables
Check your version of JDK and its installation path and set the environment variables accordingly.
Check your java version as follows:
If there is no Java/JDK available, then install it as follows :
$sudo apt install default-jre
Add the necessary environment variable in the .bashrc file.
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH # set PATH so it includes user's private bin directories PATH="$HOME/bin:$HOME/.local/bin:$PATH" export PATH=$PATH:~/Android/Sdk/cmdline-tools/latest/bin
If we resolve all the missing things and path-related discrepancies and SDK related discrepancies, the command “flutter doctor” will show the following output.
Starting an Example Application using VS Code
The following screenshot shows the example application of Flutter/Dart that was compiled on Visual Studio Code as a Linux Application and running on the emulator.
The following screenshot shows the example application of Flutter/Dart that was compiled on Visual Studio Code as a Web Application and running on the emulator.
The following screenshot shows the example application of Flutter/Dart that was compiled on Visual Studio Code as an Android Application and running on the Android Mobile Emulator. Here it is running on a simulated Google Pixel mobile!
Note: This article is nothing but my learning log. Since it is not related to any serious research or research simulation, no further support will be provided on this area. So, please do not ask any questions through e-mail regarding this article or related to this area – simply you will not get any answers from me.
References
- https://dev.to/fullstackhacker/install-flutter-on-debian-3g3h
- https://docs.flutter.dev/get-started/install/linux
- https://codelabs.developers.google.com/codelabs/flutter-codelab-first#0