This commit is contained in:
DESKTOP-I3JPKHK\wy 2025-04-21 16:05:00 +08:00
parent 7d6190040a
commit 9e24bf5747
3 changed files with 12 additions and 4 deletions

View File

@ -43,7 +43,7 @@ void main() async {
statusBarColor: Colors.transparent, //
statusBarIconBrightness: Brightness.light // dark: light
));
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); //
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]); //
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); //
runApp(const MyApp());
}
@ -82,6 +82,7 @@ class MyApp extends StatelessWidget {
},
routingCallback: (routing) {
String? currentRouter = routing?.current;
// print("当前页面 ${currentRouter}");
// print("当前路由:${currentRouter}");
// if ([Routes.home, Routes.myInfo].contains(currentRouter)) {
// SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(

View File

@ -10,14 +10,21 @@ class ImageDialog {
return AlertDialog(
// insetPadding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 45.r),
backgroundColor: Colors.transparent,
contentPadding: EdgeInsets.all(0),
contentPadding: EdgeInsets.zero,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
content: Container(
width: MediaQuery.of(context).size.width - 48.r,
// height: MediaQuery.of(context).size.height * 0.4,
color: Colors.white,
// child: PhotoView(imageProvider: NetworkImage(imgUrl),backgroundDecoration: BoxDecoration(color: Colors.transparent),)),
child: Image.network(RequestConfig.imgUrl + imgUrl)),
child: ListView(
children: [
Image.network(
RequestConfig.imgUrl + imgUrl,
fit: BoxFit.fitWidth,
),
],
)),
);
},
);

View File

@ -149,7 +149,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
@override
void onClose() {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); //
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]); //
_dataListen.cancel();
_paramListen.cancel();
imageScaleZoomStream?.cancel();