home_page.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import 'package:flutter/material.dart';
  2. /// Description: 主页
  3. /// Time : 04/28/2023 Friday
  4. /// Author : liuyuqi.gov@msn.cn
  5. class HomePage extends StatefulWidget {
  6. const HomePage({super.key});
  7. @override
  8. State<HomePage> createState() => _HomePageState();
  9. }
  10. class _HomePageState extends State<HomePage> {
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. appBar: AppBar(
  15. title: Text("context.l10n.appTitle"),
  16. leading: Builder(builder: (context) {
  17. return IconButton(
  18. icon: Icon(Icons.menu),
  19. onPressed: () {
  20. Scaffold.of(context).openDrawer();
  21. },
  22. );
  23. }),
  24. actions: [
  25. IconButton(
  26. icon: Icon(Icons.logout),
  27. onPressed: () {},
  28. )
  29. ]),
  30. drawer: Drawer(
  31. child: ListView(children: [
  32. UserAccountsDrawerHeader(
  33. accountName: Text("张三"), accountEmail: Text(""))
  34. ])),
  35. body: SafeArea(
  36. child: Column(
  37. children: [],
  38. )),
  39. );
  40. }
  41. }