Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6. // This widget is the root of your application.
  7. @override
  8. Widget build(BuildContext context) {
  9. return MaterialApp(
  10. title: 'Messio',
  11. theme: ThemeData(
  12. primarySwatch: Colors.yellow,
  13. ),
  14. home: MyHomePage(title: 'Messio'),
  15. );
  16. }
  17. }
  18.  
  19. class MyHomePage extends StatefulWidget {
  20. MyHomePage({Key key, this.title}) : super(key: key);
  21.  
  22. final String title;
  23.  
  24. @override
  25. _MyHomePageState createState() => _MyHomePageState();
  26. }
  27.  
  28. class _MyHomePageState extends State<MyHomePage> {
  29.  
  30. @override
  31. Widget build(BuildContext context) {
  32. // The Flutter framework has been optimized to make rerunning build methods
  33. // fast, so that you can just rebuild anything that needs updating rather
  34. // than having to individually change instances of widgets.
  35. return Scaffold(
  36. appBar: AppBar(
  37. // Here we take the value from the MyHomePage object that was created by
  38. // the App.build method, and use it to set our appbar title.
  39. title: Text(widget.title),
  40. ),
  41. body: Center(
  42. child:Text('Hello World!')
  43. )
  44. );
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement