Flutter Hello World App | runApp() how it works? | My First Flutter App

In flutter, everything is a widget.


runApp() function's return type is a widget and its parameter is also a widget.


Example:

import 'package:flutter/material.dart';

void main() {

  runApp(

    const Center(

      child: Text(

        'Hello World',

        textDirection: TextDirection.ltr,

      ),

    ),

  );

}


Video Link:

 
Post a Comment (0)
Previous Post Next Post