How to create a Flutter Hello World App

 How to create a Flutter Hello World App

 

import 'package:flutter/material.dart';

void main() {
  runApp(AppMain());
}

class AppMain extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Hello, World App'),
        ),
        body: const Center(
          child: Text('Hello, World!'),
        ),
      ),
    );
  }
}
 
 
Output:

 

Comments

Popular posts from this blog

Convert binary to decimal in c using built in function

Install nodeJs in linux

DFS in Complete Tree