Skip to main content

Flutter

Flutter is a UI framework for building applications from one codebase across mobile, web, desktop, and embedded targets.

What Is Flutter

Flutter uses the Dart programming language and a widget-based approach to build user interfaces.

Instead of relying only on native platform UI components, Flutter renders its own interface, which helps apps look consistent across platforms.

How To Use Flutter

Install the Flutter SDK, create a project with flutter create, run it with flutter run, and edit Dart files inside the lib folder.

Flutter projects commonly use pubspec.yaml to configure dependencies, assets, and project metadata.

Basic Example

import 'package:flutter/material.dart';

void main() {
runApp(const TiewApp());
}

class TiewApp extends StatelessWidget {
const TiewApp({super.key});

@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: Center(
child: Text('Hello, Flutter'),
),
),
);
}
}

Common Concepts

  • Widgets are the building blocks of the UI.
  • Stateless widgets render from input values.
  • Stateful widgets manage changing local state.
  • Hot reload updates the app quickly during development.

What To Learn Next

Learn layout widgets, navigation, state management, forms, platform builds, and how Flutter integrates with APIs.