Compare commits

..

No commits in common. "a61f52e25f40e9e1e678f1c88bc5da62bd8e33a5" and "07d0b999bc6f5fd786389455dcde054747bb5978" have entirely different histories.

15 changed files with 180 additions and 199 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 305 KiB

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
@ -25,111 +24,101 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String homeworkId = state.homeworkId.value; String homeworkId = state.homeworkId.value;
return AnnotatedRegion( return OrientationBuilder(
value: const SystemUiOverlayStyle( builder: (BuildContext context, Orientation orientation) {
systemNavigationBarColor:Colors.transparent, return Scaffold(
systemNavigationBarDividerColor: null, backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
statusBarColor: Colors.transparent, appBar: AppBar(
systemNavigationBarIconBrightness: Brightness.light, backgroundColor: Colors.white,
statusBarIconBrightness: Brightness.light, title: Obx(() {
statusBarBrightness: Brightness.light, return Text(state.name.value,
), style:
child: OrientationBuilder( TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
builder: (BuildContext context, Orientation orientation) { }),
return Scaffold( centerTitle: true,
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), leading: IconButton(
appBar: AppBar( icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
backgroundColor: Colors.white, onPressed: () {
title: Obx(() { Get.back();
return Text(state.name.value, },
style:
TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
}),
centerTitle: true,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () {
Get.back();
},
),
actions: const [
ReturnToHomepage(),
],
), ),
body: Padding( actions: const [
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), ReturnToHomepage(),
child: Obx(() { ],
return EasyRefresh( ),
firstRefresh: false, body: Padding(
taskIndependence: true, padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
controller: logic.refreshController, child: Obx(() {
header: MaterialHeader(), return EasyRefresh(
footer: TaurusFooter(), firstRefresh: false,
onRefresh: () async { taskIndependence: true,
return logic.getList(); controller: logic.refreshController,
}, header: MaterialHeader(),
child: state.completed.value footer: TaurusFooter(),
? Utils.isPad() onRefresh: () async {
? GridView( return logic.getList();
gridDelegate: },
SliverGridDelegateWithFixedCrossAxisCount( child: state.completed.value
crossAxisCount: 2, //widget ? Utils.isPad()
mainAxisSpacing: 10.h, ? GridView(
crossAxisSpacing: 6.w, gridDelegate:
childAspectRatio: 1.48 //1widget SliverGridDelegateWithFixedCrossAxisCount(
), crossAxisCount: 2, //widget
children: state.classList.map((taskItem) { mainAxisSpacing: 10.h,
return CompletedAnnotateItem( crossAxisSpacing: 6.w,
taskItem: taskItem, childAspectRatio: 1.48 //1widget
logic: logic, ),
name: state.name.value, children: state.classList.map((taskItem) {
); return CompletedAnnotateItem(
}).toList(), taskItem: taskItem,
) logic: logic,
: ListView.builder( name: state.name.value,
itemCount: state.classList.length, );
itemBuilder: (context, index) { }).toList(),
AnnotatedClass taskItem = state.classList[index]; )
return CompletedAnnotateItem( : ListView.builder(
taskItem: taskItem, itemCount: state.classList.length,
logic: logic, itemBuilder: (context, index) {
name: state.name.value, AnnotatedClass taskItem = state.classList[index];
); return CompletedAnnotateItem(
}) taskItem: taskItem,
: Utils.isPad() logic: logic,
? MasonryGridView.count( name: state.name.value,
crossAxisCount: 2, // );
mainAxisSpacing: 4.w, // })
crossAxisSpacing: 4.h, // : Utils.isPad()
itemCount: state.classList.length, ? MasonryGridView.count(
itemBuilder: (context, index) { crossAxisCount: 2, //
AnnotatedClass item = state.classList[index]; mainAxisSpacing: 4.w, //
return AnnotateItem( crossAxisSpacing: 4.h, //
homeworkId: homeworkId, itemCount: state.classList.length,
item: item, itemBuilder: (context, index) {
font: 11.sp, AnnotatedClass item = state.classList[index];
name: state.name.value, return AnnotateItem(
logic: logic, homeworkId: homeworkId,
); item: item,
}, font: 11.sp,
) name: state.name.value,
: ListView.builder( logic: logic,
itemCount: state.classList.length, );
itemBuilder: (context, index) { },
AnnotatedClass item = state.classList[index]; )
return AnnotateItem( : ListView.builder(
homeworkId: homeworkId, itemCount: state.classList.length,
item: item, itemBuilder: (context, index) {
font: 12.sp, AnnotatedClass item = state.classList[index];
name: state.name.value, return AnnotateItem(
logic: logic, homeworkId: homeworkId,
); item: item,
})); font: 12.sp,
}), name: state.name.value,
), logic: logic,
); );
}), }));
); }),
),
);
});
} }
@override @override

View File

@ -71,6 +71,35 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
// padding: EdgeInsets.symmetric(vertical: 1.h), // padding: EdgeInsets.symmetric(vertical: 1.h),
child: Row( child: Row(
children: [ children: [
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.submit(context)),
child: quickText('提 交', size: 14.sp, color: Theme.of(context).primaryColor),
),
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
child: quickText('取 消', size: 14.sp, color: Colors.white),
),
),
),
],
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded( Expanded(
flex: 7, flex: 7,
child: Column( child: Column(
@ -79,18 +108,6 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
Expanded( Expanded(
child: Row( child: Row(
children: [ children: [
//
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
child: quickText('全 对', color: Colors.white, size: 12.sp),
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.allPairs(context)),
),
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
// //
Expanded( Expanded(
child: SizedBox( child: SizedBox(
@ -134,6 +151,18 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
), ),
), ),
), ),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
//
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
child: quickText('全 对', color: Colors.white, size: 12.sp),
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.allPairs(context)),
),
),
),
], ],
), ),
), ),
@ -141,19 +170,6 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
Expanded( Expanded(
child: Row( child: Row(
children: [ children: [
//
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () =>
easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.allWrongRating(context)),
child: quickText('全 错', color: Colors.white, size: 12.sp),
),
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
// //
Expanded( Expanded(
child: SizedBox( child: SizedBox(
@ -183,43 +199,25 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
), ),
), ),
), ),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
//
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () =>
easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.allWrongRating(context)),
child: quickText('全 错', color: Colors.white, size: 12.sp),
),
),
),
], ],
), ),
), ),
], ],
), ),
), ),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
child: quickText('取 消', size: 14.sp, color: Colors.white),
),
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.submit(context)),
child: quickText('提 交', size: 14.sp, color: Theme.of(context).primaryColor),
),
),
),
],
),
),
], ],
), ),
); );

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart'; import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
@ -48,40 +47,30 @@ class _HomeworkReviewState extends State<HomeworkReview> {
_homeLogicController.getList(); _homeLogicController.getList();
} }
}, },
child: AnnotatedRegion( child: SafeArea(
value: const SystemUiOverlayStyle( child: Scaffold(
systemNavigationBarColor: Color(0xFF000000), appBar: AppBar(
systemNavigationBarDividerColor: null, // titleSpacing: 0,
statusBarColor: Colors.transparent, leading: IconButton(icon: const Icon(Icons.arrow_back_ios), onPressed: () => Get.back()),
systemNavigationBarIconBrightness: Brightness.light, iconTheme: const IconThemeData(color: Colors.black),
statusBarIconBrightness: Brightness.light, title: quickText(sateData.param.value.homeworkName),
statusBarBrightness: Brightness.light, backgroundColor: Colors.white,
), elevation: 0,
child: SafeArea( actions: [const FavoriteWidget(), SizedBox(width: 5.w), const ReturnToHomepage()],
child: Scaffold(
appBar: AppBar(
// titleSpacing: 0,
leading: IconButton(icon: const Icon(Icons.arrow_back_ios), onPressed: () => Get.back()),
iconTheme: const IconThemeData(color: Colors.black),
title: quickText(sateData.param.value.homeworkName),
backgroundColor: Colors.white,
elevation: 0,
actions: [const FavoriteWidget(), SizedBox(width: 5.w), const ReturnToHomepage()],
),
body: SafeArea(
child: Column(
children: [
//
const DropdownSwitchStudentsType(),
SizedBox(height: 1.h),
const Expanded(child: QuestionPaperView()),
const BottomAnnotationSwitch()
],
),
),
// floatingActionButton: const ButtonFloatingAction(),
// floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
), ),
body: SafeArea(
child: Column(
children: [
//
const DropdownSwitchStudentsType(),
SizedBox(height: 1.h),
const Expanded(child: QuestionPaperView()),
const BottomAnnotationSwitch()
],
),
),
// floatingActionButton: const ButtonFloatingAction(),
// floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
), ),
), ),
); );

View File

@ -24,7 +24,7 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light,
statusBarColor: Colors.transparent, // statusBarColor: Colors.transparent, //
// systemStatusBarContrastEnforced: false, systemStatusBarContrastEnforced: false,
)); ));
super.initState(); super.initState();
} }

View File

@ -21,6 +21,11 @@ class _ReadOverPageState extends State<ReadOverPage> {
@override @override
void initState() { void initState() {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarColor: Colors.transparent, //
statusBarIconBrightness: Brightness.light,
systemStatusBarContrastEnforced: false,
));
super.initState(); super.initState();
} }
@ -28,9 +33,9 @@ class _ReadOverPageState extends State<ReadOverPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AnnotatedRegion( return AnnotatedRegion(
value: const SystemUiOverlayStyle( value: const SystemUiOverlayStyle(
/* systemNavigationBarColor: Color(0xFF000000), systemNavigationBarColor: Color(0xFF000000),
systemNavigationBarDividerColor: null,*/ systemNavigationBarDividerColor: null,
statusBarColor: Colors.transparent, statusBarColor: Colors.white,
systemNavigationBarIconBrightness: Brightness.light, systemNavigationBarIconBrightness: Brightness.light,
statusBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.light, statusBarBrightness: Brightness.light,