Introduction to Flutter
What is Flutter?
Flutter is an open-source framework created by Google for building mobile, web, and desktop applications using a single codebase. This means you don’t need to write separate code for Android, iOS, or other platforms.
Key Features:
✅ Uses Dart programming language.
✅ Provides a fast development experience with hot reload (see changes instantly).
✅ Offers beautiful UI widgets for a smooth and native-like experience.
What is Dart?
Dart is the programming language used in Flutter. It is:
- Developed by Google.
- Easy to learn (similar to JavaScript & Java).
- Fast because it compiles to native machine code.
- Used for both frontend (UI) and backend (server-side with Dart VM).
Example of Dart Code:
void main() {
print('Hello, Flutter!');
}
This prints "Hello, Flutter!" to the console.
One Codebase, Multiple Platforms
With Flutter, you write one set of code, and it runs on:
📱 Android & iOS
💻 Windows, macOS, Linux
🌐 Web (Chrome, Edge, etc.)
📺 Embedded Devices
Instead of learning Swift (iOS) and Kotlin (Android) separately, Flutter lets you build apps for both using Dart!
Setup Flutter
Follow the official documentation for step-by-step setup:
👉 Flutter Installation Guide
Creating Fluter App
To create a new Flutter app, use the following command in your terminal or command prompt:
flutter create my_app
Replace my_app
with your desired project name.
Steps to Run the App:
- Navigate into your project folder:
cd my_app
- Run the app on a connected device or emulator:
flutter run