From c6eadb8a0e815a955bb27387c0f5f8657e7b8fa3 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Fri, 18 Dec 2020 16:38:11 +0800 Subject: [PATCH] camView title --- lib/utils/camera_util.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/utils/camera_util.dart b/lib/utils/camera_util.dart index 5abf660..6f82f97 100644 --- a/lib/utils/camera_util.dart +++ b/lib/utils/camera_util.dart @@ -12,14 +12,16 @@ Future camFile({double maxHeight = 3000, double maxWidth = 3000}) async { } Future camView(BuildContext context, - {double maxHeight = 3000, double maxWidth = 3000}) async { + {double maxHeight = 3000, + double maxWidth = 3000, + @required String title}) async { File file = await camFile(maxHeight: maxHeight, maxWidth: maxWidth); if (file == null) return null; return await Navigator.push(context, PageRouteBuilder( pageBuilder: (context, animation, secondAnimation) { return FadeTransition( opacity: animation, - child: CameraView(file: file, title: '照片选择器'), + child: CameraView(file: file, title: title), ); }, ));