This app focuses on printing out the text "Hi there, Vaibhav" by following these steps:
project01 > lib > main.dart
import 'package:flutter/material.dart';
Importing the Material Dart library to implement Material Design in our app.void main()
Creating themain()
method which will be our entry point of the app. It returns void i.e noreturn
value.var app = MaterialApp(home: Text('Hi there, Vaibhav'));
Create aText
widget with aMaterialApp
widget class and pass in 'Hi there, Vaibhav' as the output text to be displayed. All of this is stored in theapp
variable.runApp(app);
Call therunApp
function and pass in theapp
variable created in the previous step.