import 'package:flutter/material.dart';
import 'package:qhd_prevention/pages/home/study/study_my_task_page.dart';
import 'package:qhd_prevention/pages/home/study/study_score_page.dart';
import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/tools/tools.dart';

class StudyGardenPage extends StatefulWidget {
  const StudyGardenPage({super.key});

  @override
  State<StudyGardenPage> createState() => _StudyGardenPageState();
}

class _StudyGardenPageState extends State<StudyGardenPage> {

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: MyAppbar(title: '学习园地'),
      body: SafeArea(child: Column(
        children: [
          Padding(padding: EdgeInsets.only(left: 0,top: 0,right: 0),
          child: Image.asset('assets/images/study-banner.png')),
          Container(
            color: Colors.white,
            padding: EdgeInsets.all(12),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              spacing: 15,
              children: [
                GestureDetector(
                  child: Image.asset('assets/images/study-app01.png', width: (screenWidth(context) - 15-25)/2),
                  onTap: () {
                    pushPage(StudyMyTaskPage(), context);
                  },
                ),
                GestureDetector(
                  child: Image.asset('assets/images/study-app02.png', width: (screenWidth(context) - 15-25)/2),
                  onTap: () {
                    pushPage(StudyScorePage(), context);

                  },
                )
              ],
            ),
          )
        ],
      )),
    );
  }
}
