Posted By

markt22 on 07/17/18


Tagged

flutter dart


Versions (?)

Flutter: Basic Stateless App


 / Published in: JavaScript
 

A very basic stateless app which displays "hello world". Useful as a blank template.

  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6. @override
  7. Widget build(BuildContext context) => MaterialApp(home: MyHomePage());
  8. }
  9.  
  10. class MyHomePage extends StatelessWidget {
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. body: Center(
  15. child: Text("Hello World")
  16. )
  17. );
  18. }
  19. }

Report this snippet  

You need to login to post a comment.