flutter 与 Hello World

flutter 采用 dart 语言开发的框架。
main.dart 是项目开始的地方。

代码:

import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text("Welcome to flutter"),
        ),
        body: new Center(
          child: new Center(
            child: new Text("Hello World"),
          ),
        ),
      ),
    );
  }
}

效果:
4D821D4B-A217-4D60-9AC6-380253EEC84A