Description #
Flutter is an open-source UI toolkit developed by Google for building natively compiled, cross-platform applications from a single codebase. It enables developers to create beautiful, fast, and responsive apps for mobile, web, and desktop platforms.
History #
Flutter was first announced in 2017 and officially released in December 2018. It uses the Dart programming language and was designed to provide high-performance rendering with a rich set of customizable widgets, enabling rapid development and expressive UIs.
Hello World Code #
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Hello, World!')),
body: Center(child: Text('Hello, World!')),
),
);
}
}
How to Run #
Option 1: Online
Try Flutter with DartPad: DartPad Flutter
Option 2: Local
- Install Flutter SDK from https://flutter.dev/docs/get-started/install
- Run app with:
flutter create hello_world
cd hello_world
flutter run
Key Concepts #
- Uses Dart language with ahead-of-time (AOT) compilation
- Single codebase for Android, iOS, web, Windows, macOS, and Linux
- Rich widget library for building customizable UI components
- Hot reload feature for fast development cycles
- Built-in support for animations and gestures
- Reactive programming model with declarative UI
- Access to native device features via platform channels
- Extensive ecosystem and plugins
- Strong community support and Google backing
- Supports Material Design and Cupertino UI styles
Try It Online #
Fun Facts #
- Flutter’s rendering engine, Skia, is the same as used in Google Chrome and Android.
- It was initially codenamed “Sky” and ran on the Android OS.
- Flutter apps are compiled directly to native ARM code, offering high performance.
- The hot reload feature can apply code changes almost instantly without restarting the app.
- Major apps like Google Ads and Alibaba use Flutter for their mobile apps.