import 'dart:io'; import 'package:camerawesome/camerawesome_plugin.dart'; import 'package:path_provider/path_provider.dart'; Future path(CaptureMode captureMode) async { final Directory extDir = await getTemporaryDirectory(); final testDir = await Directory('${extDir.path}/test').create(recursive: true); final String fileExtension = captureMode == CaptureMode.photo ? 'jpg' : 'mp4'; final String filePath = '${testDir.path}/${DateTime.now().millisecondsSinceEpoch}.$fileExtension'; return filePath; }