切换前置/后置摄像头
This commit is contained in:
parent
535eb2e54e
commit
c3e394255a
|
|
@ -579,4 +579,9 @@ class MeetingMainLogic extends GetxController with RequestToolMixin{
|
||||||
await state.rctEngine.value?.stopPreview();
|
await state.rctEngine.value?.stopPreview();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 切换前置/后置摄像头
|
||||||
|
Future<void> switchCamera() async {
|
||||||
|
await state.rctEngine.value?.switchCamera();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,15 +72,23 @@ class MeetingMainPage extends StatelessWidget {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Row(
|
Visibility(
|
||||||
children: [
|
visible: state.isOpenCamera.value,
|
||||||
SizedBox(width: 16.w),
|
child: GestureDetector(
|
||||||
Image.asset(
|
child: Row(
|
||||||
'assets/images/meeting_main_rotate_camera.png',
|
children: [
|
||||||
width: 20.w,
|
SizedBox(width: 16.w),
|
||||||
height: 20.h,
|
Image.asset(
|
||||||
)
|
'assets/images/meeting_main_rotate_camera.png',
|
||||||
],
|
width: 20.w,
|
||||||
|
height: 20.h,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onTap: (){
|
||||||
|
logic.switchCamera();
|
||||||
|
},
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue