Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
laki_icu_app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张宏
laki_icu_app
Commits
026b37a8
Commit
026b37a8
authored
Jun 17, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
cf3b74d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
usb_camera_service.dart
lib/services/usb_camera_service.dart
+4
-4
camera_controls.dart
lib/views/home/index/widgets/camera_controls.dart
+16
-14
monitoring_screen.dart
lib/views/home/index/widgets/monitoring_screen.dart
+4
-1
No files found.
lib/services/usb_camera_service.dart
View file @
026b37a8
...
...
@@ -141,8 +141,8 @@ class UsbCameraService {
await
_controller
.
openCamera
(
deviceId
,
request:
const
CameraRequest
(
previewWidth:
64
0
,
previewHeight:
48
0
,
previewWidth:
128
0
,
previewHeight:
72
0
,
renderMode:
RenderMode
.
opengl
,
previewFormat:
PreviewFormat
.
mjpeg
,
),
...
...
@@ -171,8 +171,8 @@ class UsbCameraService {
await
_controller
.
openCamera
(
deviceId
,
request:
request
??
const
CameraRequest
(
previewWidth:
64
0
,
previewHeight:
48
0
,
previewWidth:
128
0
,
previewHeight:
72
0
,
renderMode:
RenderMode
.
opengl
,
previewFormat:
PreviewFormat
.
mjpeg
,
),
...
...
lib/views/home/index/widgets/camera_controls.dart
View file @
026b37a8
...
...
@@ -47,20 +47,22 @@ class CameraControls extends StatelessWidget {
enabled:
true
,
// 刷新按钮始终可用
),
SizedBox
(
width:
16
.
w
),
_buildControlButton
(
icon:
Icons
.
camera_alt
,
onPressed:
cameraReady
?
onTakePhoto
:
null
,
tooltip:
'拍照'
,
enabled:
cameraReady
,
),
SizedBox
(
width:
16
.
w
),
_buildControlButton
(
icon:
isRecording
?
Icons
.
stop
:
Icons
.
videocam
,
onPressed:
cameraReady
?
onToggleRecord
:
null
,
tooltip:
isRecording
?
'停止录像'
:
'开始录像'
,
isActive:
isRecording
,
enabled:
cameraReady
,
),
// todo 放大,全屏
// _buildControlButton(
// icon: Icons.camera_alt,
// onPressed: cameraReady ? onTakePhoto : null,
// tooltip: '拍照',
// enabled: cameraReady,
// ),
// SizedBox(width: 16.w),
// _buildControlButton(
// icon: isRecording ? Icons.stop : Icons.videocam,
// onPressed: cameraReady ? onToggleRecord : null,
// tooltip: isRecording ? '停止录像' : '开始录像',
// isActive: isRecording,
// enabled: cameraReady,
// ),
],
);
}
...
...
lib/views/home/index/widgets/monitoring_screen.dart
View file @
026b37a8
...
...
@@ -171,7 +171,10 @@ class _MonitoringScreenState extends State<MonitoringScreen> {
Widget
_buildCameraPreview
()
{
return
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
20
.
r
),
child:
const
UsbCameraPreview
(),
child:
const
AspectRatio
(
aspectRatio:
16
/
9
,
child:
UsbCameraPreview
(),
),
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment