enterSmallWindowMode method
Future<void>
enterSmallWindowMode(
)
Implementation
Future<void> enterSmallWindowMode() async {
// 判断是否是正在上课中
if (_classInfoObs.getClassInfo().classId == 0) {
TCICLog.error("classId is empty", actionModule: ActionModule.tcicController.name, actionName: ActionName.enterSmallWindowMode.name);
TCICToast.show(StringEnum.classIdEmpty);
return;
}
// 判断是否是正在上课中
if (_classInfoObs.getClassInfo().roomInfo.status != ClassStatus.alreadyStart.index) {
TCICLog.error("class is not started", actionModule: ActionModule.tcicController.name, actionName: ActionName.enterSmallWindowMode.name);
TCICToast.show(StringEnum.classStatusNotStart);
return;
}
// 返回上一页
if (_rootContext != null) {
showSmallWindowFloat();
Navigator.of(_rootContext!).pop();
} else {
TCICLog.error("rootContext is null", actionModule: ActionModule.tcicController.name, actionName: ActionName.enterSmallWindowMode.name);
}
}