import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch
main.dart flutter 默认代码
最新推荐文章于 2024-03-27 11:52:24 发布
这篇博客将深入解析Flutter应用程序的入口点`main.dart`文件中的默认代码,涵盖其核心组件和基本结构,帮助Android开发者快速理解Flutter的开发模式。
摘要由CSDN通过智能技术生成