📜  flutter main.dart 示例 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:02.680000             🧑  作者: Mango

代码示例1
void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}):super(key:key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Scaffold(
        resizeToAvoidBottomInset:false,
        appBar: AppBar(title: const Text('Profile App')),
        body: const SafeArea(
          child: HomePage(),
        )
      ),
    );
  }
}