import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; void main() => runApp(DemoApp()); class DemoApp extends StatelessWidget{ //这个是整个应用的主组件 @override Widget build(BuildContext context) { // TODO: implement build return new MaterialApp( title: 'MaterialApp示例', debugShowMaterialGrid: true, showPerformanceOverlay: true, theme: new ThemeData( primaryColor: Colors.deepOrange ), home: new MaterialAppDemo(), ); } } class MaterialAppDemo extends StatelessWidget { @override Widget build(BuildContext context) { // TODO: implement build return new Scaffold( appBar: new AppBar( title: Text('MaterialAppDemo'), ), body: new Center( child: new Text('MaterialAppDemo'), ), ); } }
Flutter学习笔记(15)--MaterialApp应用组件及routes路由详解 (2)
内容版权声明:除非注明,否则皆为本站原创文章。