takePhoto static method
拍照 only
Implementation
static Future<AssetEntity?> takePhoto(BuildContext context) async {
final AssetEntity? asset = await CameraPicker.pickFromCamera(
context,
enableRecording: false, //是否可以录像
resolutionPreset: ResolutionPreset.high,
maximumRecordingDuration: const Duration(seconds: 10),
theme: CameraPicker.themeData(HColors.app_accent_5A46BE),
);
return asset;
}