part of home;

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);
    return Scaffold(
      appBar: AppBar(title: const Text('首页'),),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          GestureDetector(
            onTap: (){
              context.pushNamed(Routes.web);
            },
            child: Container(
              color: Colors.cyan,
              child: Text('web'),
              height: 40,
              // width: double.infinity,
              alignment: Alignment.center,
            ),
          ),
          GestureDetector(
            onTap: (){
              context.pushNamed(Routes.about);
            },
            child: Container(
              color: Colors.indigo,
              child: Text('关于我们'),
              height: 40,
              width: double.infinity,
              alignment: Alignment.center,
            ),
          )

        ],
      )
    );
  }
}
