Flutter 无状态Hello world程序:
import 'package:flutter/material.dart'; void main() { runApp( MyApp() ); } class MyApp extends StatelessWidget{ @override Widget build(BuildContext context) { return MaterialApp(title: "hello world",home: new MyHomePage(),); } } class MyHomePage extends StatelessWidget{ @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text("AppBar title")), body: Center(child: Text('Hello world'),),); } }