Flutter is a offered by Google that let developers build cross-platform applications that could be executed in different systems such as Android or iOS with just a common codebase.
Flutter uses Dart as a single programming Language.
Flutter does not execute Dart code directly, but compiles the code to native for better performance.
main() calls the runApp function which requires you pass a Widget object as a parameter.
import 'package:flutter/material.dart';
void main() {
runApp(
Center(
child: Text(
'Hello, world!',
textDirection: TextDirection.ltr,
),
),
);
}
If you want to use the Material design system Flutter has a convienient MaterialApp class that a number of widgets that are commonly required for material design applications
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Text("Hello, World!")
)
);
}
We can use the MaterialApp class to create and pass a Widget object and