|
|
|
@ -12,14 +12,16 @@ Future<File> camFile({double maxHeight = 3000, double maxWidth = 3000}) async {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<File> 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),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|