From 57c3455d10a765faba246bb29f5938773cb158a0 Mon Sep 17 00:00:00 2001 From: Liplum Date: Thu, 26 Sep 2024 09:03:05 +0800 Subject: [PATCH] renamed files --- lib/school/exam_arrange/{index.dart => card.dart} | 0 lib/school/exam_result/{index.pg.dart => card.pg.dart} | 0 lib/school/exam_result/{index.ug.dart => card.ug.dart} | 0 lib/school/exam_result/page/result.ug.dart | 10 ++++++++++ lib/school/index.dart | 6 +++--- 5 files changed, 13 insertions(+), 3 deletions(-) rename lib/school/exam_arrange/{index.dart => card.dart} (100%) rename lib/school/exam_result/{index.pg.dart => card.pg.dart} (100%) rename lib/school/exam_result/{index.ug.dart => card.ug.dart} (100%) diff --git a/lib/school/exam_arrange/index.dart b/lib/school/exam_arrange/card.dart similarity index 100% rename from lib/school/exam_arrange/index.dart rename to lib/school/exam_arrange/card.dart diff --git a/lib/school/exam_result/index.pg.dart b/lib/school/exam_result/card.pg.dart similarity index 100% rename from lib/school/exam_result/index.pg.dart rename to lib/school/exam_result/card.pg.dart diff --git a/lib/school/exam_result/index.ug.dart b/lib/school/exam_result/card.ug.dart similarity index 100% rename from lib/school/exam_result/index.ug.dart rename to lib/school/exam_result/card.ug.dart diff --git a/lib/school/exam_result/page/result.ug.dart b/lib/school/exam_result/page/result.ug.dart index 21526efe..cbc1d1a9 100644 --- a/lib/school/exam_result/page/result.ug.dart +++ b/lib/school/exam_result/page/result.ug.dart @@ -1,4 +1,5 @@ import 'package:collection/collection.dart'; +import 'package:fit_system_screenshot/fit_system_screenshot.dart'; import 'package:flutter/material.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -32,16 +33,24 @@ class _ExamResultUgPageState extends ConsumerState { bool fetching = false; final $loadingProgress = ValueNotifier(0.0); late SemesterInfo selected = initial; + final scrollAreaKey = GlobalKey(); final controller = ScrollController(); + Dispose? screenShotDispose; @override void initState() { super.initState(); fetch(); + screenShotDispose = fitSystemScreenshot.attachToPage( + scrollAreaKey, + controller, + controller.jumpTo, + ); } @override void dispose() { + screenShotDispose?.call(); $loadingProgress.dispose(); controller.dispose(); super.dispose(); @@ -87,6 +96,7 @@ class _ExamResultUgPageState extends ConsumerState { final resultList = this.resultList?.sorted(ExamResultUg.compareByTime).reversed.toList(); return Scaffold( body: CustomScrollView( + key: scrollAreaKey, controller: controller, slivers: [ SliverAppBar.medium( diff --git a/lib/school/index.dart b/lib/school/index.dart index f9907452..e4cd285d 100644 --- a/lib/school/index.dart +++ b/lib/school/index.dart @@ -6,9 +6,9 @@ import 'package:mimir/feature/feature.dart'; import 'package:mimir/feature/utils.dart'; import 'package:mimir/school/class2nd/index.dart'; import 'package:mimir/school/event.dart'; -import 'package:mimir/school/exam_arrange/index.dart'; -import 'package:mimir/school/exam_result/index.pg.dart'; -import 'package:mimir/school/exam_result/index.ug.dart'; +import 'package:mimir/school/exam_arrange/card.dart'; +import 'package:mimir/school/exam_result/card.pg.dart'; +import 'package:mimir/school/exam_result/card.ug.dart'; import 'package:mimir/school/freshman/card.dart'; import 'package:mimir/school/library/index.dart'; import 'package:mimir/school/oa_announce/index.dart';