What Is Flutter?
Part of the Your First App section of Coddy's Flutter journey. Lesson 1 of 32.
Flutter is a toolkit from Google for building apps. You write one app, and it runs on Android phones, iPhones, the web and desktop computers. Apps like Google Pay and the BMW app are built with it.
You write Flutter apps in a language called Dart. You will learn the Dart you need as you go, one small piece at a time.
A Flutter app is built out of widgets. A widget is one piece of the screen: a line of text, a button, a picture, or a box that holds other widgets. This app has a few of them:
void main() {
runApp(const MyApp());
}main() is where every Dart program starts. runApp takes a widget and puts it on the screen. Further down, inside MyApp, you can see the widgets this app shows: a Scaffold (a blank screen), a Center and a Text. You do not need to understand every line yet. By the end of this section you will.
Challenge
EasyPress Run. Your app appears on the phone screen.
Then change Hello, Flutter! to any words you like, keep the quotes around them, and press Run again to see your change. When you are done, press Check.
Try it yourself
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Text('Hello, Flutter!'),
),
),
);
}
}
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Your First App
1Hello, Flutter
What Is Flutter?Change the TextThe Widget TreeScaffold and AppBarStrings and QuotesCommentsPractice on your own: Online Flutter compiler