Browse Source

Merge remote-tracking branch 'origin/dev' into remove_uniapp

ff_new
fmk 3 years ago
parent
commit
e502302d3c
  1. 103
      lib/community/community_view/class_details.dart
  2. 2
      lib/settlement/settlement.dart
  3. 2
      lib/union/union_page.dart

103
lib/community/community_view/class_details.dart

@ -4,6 +4,7 @@ import 'package:chewie/chewie.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.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 { Future<void> _fullScreenListener() async {
if (!chewieAudioController.isFullScreen) { if (!chewieAudioController.isFullScreen && !tempDelayedFlag) {
Future.delayed(Duration(seconds: 1), () {}); 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;
});
});
} }
} }
@ -410,52 +425,52 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
child: Stack(children: [ child: Stack(children: [
(chewieAudioController != null (chewieAudioController != null
? Container( ? Container(
width: width, color: Colors.black,
height: height, width: width,
child: chewies = Chewie( // height:
controller: chewieAudioController, height: width / 7 * 5,
), child: chewies = Chewie(
) controller: chewieAudioController,
),
)
: Container( : Container(
width: width, width: width,
height: height, height: height,
)), )),
if(isShowImg) if (isShowImg)
GestureDetector( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
isShowImg = false; isShowImg = false;
if(chewieAudioController != null) if (chewieAudioController != null)
chewieAudioController.play(); chewieAudioController.play();
}); });
}, },
child: Container( child: Container(
width: width, width: width,
height: height, height: width / 7 * 5,
color: Colors.black, color: Colors.black,
child: Stack( child: Stack(
children: [ children: [
Center( Center(
child: MImage( child: MImage(
src, src,
width:width, fit: BoxFit.cover,
height: height, errorSrc: "assets/image/default_2_1.png",
fit: BoxFit.fill, fadeSrc: "assets/image/default_2_1.png",
errorSrc: "assets/image/default_2_1.png", ),
fadeSrc: "assets/image/default_2_1.png",
), ),
), Center(
Center( child: Icon(
child: Icon( Icons.play_circle_outline,
Icons.play_circle_outline, color: Colors.white,
color: Colors.white, size: 60,
size: 60, ),
), ),
), ],
], ),
), ),
), ),
),
])); ]));
} }
@ -501,7 +516,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
setState(() { setState(() {
chapterIndex = position; chapterIndex = position;
isShowImg = true; isShowImg = true;
if(chewieAudioController != null) if (chewieAudioController != null)
chewieAudioController.pause(); chewieAudioController.pause();
initVideo(chapterList[position].content.fileUrl); initVideo(chapterList[position].content.fileUrl);
}); });

2
lib/settlement/settlement.dart

@ -333,7 +333,7 @@ class _Settlement extends State<Settlement> {
"id": orderId, "id": orderId,
}, },
); );
Navigator.of(context).pop(); // Navigator.of(context).pop();
} }
@override @override

2
lib/union/union_page.dart

@ -234,7 +234,7 @@ class _UnionPage extends State<UnionPage>
PreferredSize( PreferredSize(
preferredSize: Size(double.infinity, 52.h), preferredSize: Size(double.infinity, 52.h),
child: Container( child: Container(
padding: EdgeInsets.only(top: 20.h), padding: EdgeInsets.only(top:15.h),
color: Color(0xFFFAFAFA), color: Color(0xFFFAFAFA),
child: ItemTitle( child: ItemTitle(
text: S.of(context).jingbilianmenghuiyuandian, text: S.of(context).jingbilianmenghuiyuandian,

Loading…
Cancel
Save