pickFromCamera method
Future<ExtendedAssetEntity?>
pickFromCamera(
- BuildContext context, {
- CameraPickerConfig? pickerConfig,
- CameraPickerPageRoute<
AssetEntity> pageRouteBuilder(- Widget picker
通过相机拍照
Implementation
Future<ExtendedAssetEntity?> pickFromCamera(BuildContext context,
{bool useRootNavigator = true,
CameraPickerConfig? pickerConfig,
CameraPickerPageRoute<AssetEntity> Function(Widget picker)?
pageRouteBuilder}) async {
final AssetEntity? entity = await FlAssetsPicker.showPickerFromCamera(
context,
checkPermission: _assetsPicker.checkPermission,
pickerConfig: pickerConfig ?? cameraConfig,
useRootNavigator: useRootNavigator,
pageRouteBuilder: pageRouteBuilder);
if (entity != null) {
return await entity.toExtensionAssetEntity(
renovate: _assetsPicker.renovate);
}
return null;
}