main.dart 483 B

123456789101112131415161718192021222324252627
  1. import 'package:flutter/material.dart';
  2. void main() {
  3. runApp(App());
  4. }
  5. class App extends StatelessWidget {
  6. // This widget is the root of your application.
  7. @override
  8. Widget build(BuildContext context) {
  9. return MaterialApp(
  10. title:'my first flutter',
  11. home: Page1(),
  12. );
  13. }
  14. }
  15. class Page1 extends StatelessWidget{
  16. Widget build(BuildContext context) {
  17. return Scaffold(
  18. appBar: AppBar(title: Text('页面1')),
  19. body: Text('a'),
  20. );
  21. }
  22. }