|
@@ -4,6 +4,9 @@ import 'package:vitalapp/helper/sonopost_preview_helper.dart';
|
|
|
import 'package:vitalapp/rpc.dart';
|
|
|
|
|
|
class CapturePage extends StatefulWidget {
|
|
|
+ final String title;
|
|
|
+ final Function onClose;
|
|
|
+ const CapturePage({super.key, required this.title, required this.onClose});
|
|
|
@override
|
|
|
_CapturePageState createState() => _CapturePageState();
|
|
|
}
|
|
@@ -29,50 +32,74 @@ class _CapturePageState extends State<CapturePage> {
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
return Container(
|
|
|
- height: 300,
|
|
|
+ height: 800,
|
|
|
alignment: Alignment.center,
|
|
|
- child: Column(
|
|
|
+ child: Stack(
|
|
|
children: [
|
|
|
- Expanded(
|
|
|
- child: Container(
|
|
|
- child: ShellSonopostPlayer(
|
|
|
- controller: controller,
|
|
|
- ),
|
|
|
- )),
|
|
|
- SizedBox(
|
|
|
- height: 10,
|
|
|
- ),
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ Column(
|
|
|
children: [
|
|
|
SizedBox(
|
|
|
- width: 120,
|
|
|
- height: 36,
|
|
|
- child: VButton(
|
|
|
- child: Text("截图"),
|
|
|
- onTap: () {
|
|
|
- rpc.platform.keypadPressF1();
|
|
|
- },
|
|
|
- ),
|
|
|
+ height: 10,
|
|
|
),
|
|
|
+ Text(
|
|
|
+ widget.title,
|
|
|
+ style: TextStyle(fontSize: 24),
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: Container(
|
|
|
+ child: ShellSonopostPlayer(
|
|
|
+ controller: controller,
|
|
|
+ ),
|
|
|
+ )),
|
|
|
SizedBox(
|
|
|
- width: 30,
|
|
|
+ height: 10,
|
|
|
+ ),
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ width: 120,
|
|
|
+ height: 36,
|
|
|
+ child: VButton(
|
|
|
+ child: Text("截图"),
|
|
|
+ onTap: () {
|
|
|
+ rpc.platform.keypadPressF1();
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ SizedBox(
|
|
|
+ width: 30,
|
|
|
+ ),
|
|
|
+ SizedBox(
|
|
|
+ width: 120,
|
|
|
+ height: 36,
|
|
|
+ child: VButton(
|
|
|
+ child: Text(isRecording ? "结束录制" : "开始录制"),
|
|
|
+ onTap: () {
|
|
|
+ rpc.platform.keypadPressF2();
|
|
|
+ setState(() {
|
|
|
+ isRecording = !isRecording;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
SizedBox(
|
|
|
- width: 120,
|
|
|
- height: 36,
|
|
|
- child: VButton(
|
|
|
- child: Text(isRecording ? "结束录制" : "开始录制"),
|
|
|
- onTap: () {
|
|
|
- rpc.platform.keypadPressF2();
|
|
|
- setState(() {
|
|
|
- isRecording = !isRecording;
|
|
|
- });
|
|
|
- },
|
|
|
- ),
|
|
|
+ height: 10,
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
+ Positioned(
|
|
|
+ top: 5,
|
|
|
+ right: 5,
|
|
|
+ child: IconButton(
|
|
|
+ onPressed: () {
|
|
|
+ widget.onClose();
|
|
|
+ },
|
|
|
+ icon: Icon(Icons.close),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
);
|