pickFromCamera method

Future<ExtendedAssetEntity?> pickFromCamera(
  1. BuildContext context, {
  2. bool useRootNavigator = true,
  3. CameraPickerConfig? pickerConfig,
  4. CameraPickerPageRoute<AssetEntity> pageRouteBuilder(
    1. 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;
}