|
|
|
@ -4,6 +4,7 @@ import 'package:chewie/chewie.dart';
|
|
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
|
import 'package:flutter/cupertino.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:flutter/services.dart'; |
|
|
|
|
import 'package:flutter_easyloading/flutter_easyloading.dart'; |
|
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
@ -395,9 +396,23 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool tempDelayedFlag = false; |
|
|
|
|
|
|
|
|
|
Future<void> _fullScreenListener() async { |
|
|
|
|
if (!chewieAudioController.isFullScreen) { |
|
|
|
|
Future.delayed(Duration(seconds: 1), () {}); |
|
|
|
|
if (!chewieAudioController.isFullScreen && !tempDelayedFlag) { |
|
|
|
|
tempDelayedFlag = true; |
|
|
|
|
SystemChrome.setPreferredOrientations( |
|
|
|
|
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); |
|
|
|
|
setState(() {}); |
|
|
|
|
SystemChrome.setPreferredOrientations( |
|
|
|
|
[DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]); |
|
|
|
|
Future.delayed(Duration(seconds: 1), () { |
|
|
|
|
SystemChrome.setPreferredOrientations( |
|
|
|
|
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); |
|
|
|
|
setState(() { |
|
|
|
|
tempDelayedFlag = false; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -431,16 +446,14 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
|
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: width, |
|
|
|
|
height: height, |
|
|
|
|
height: width / 7 * 6, |
|
|
|
|
color: Colors.black, |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
|
Center( |
|
|
|
|
child: MImage( |
|
|
|
|
src, |
|
|
|
|
width:width, |
|
|
|
|
height: height, |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
errorSrc: "assets/image/default_2_1.png", |
|
|
|
|
fadeSrc: "assets/image/default_2_1.png", |
|
|
|
|
), |
|
|
|
|