native_camera_view 0.0.14
native_camera_view: ^0.0.14 copied to clipboard
A Flutter plugin for custom native camera integration. Supports image capture, camera switching, pause/resume, and unique capture of the last frame when paused on iOS & Android.
0.0.14 #
- Fixed camera on Android
0.0.13 #
- Update widget NativeCameraView
0.0.12 #
- Fixed
loadingWidget
0.0.11 #
- Add
loadingWidget
0.0.10 #
- Add
bypassPermissionCheckparameter to ignore camera permission check
0.0.9 #
- Removed
permission_handler - Fixed camera on IOS
0.0.8 #
- Fixed an issue where photos were rotated when shooting in cover and pause camera modes on IOS
- Fixed the error of switching the front and rear cameras on IOS
0.0.7 #
- Fixed contain view IOS
0.0.6 #
- Update
permission_handlerto12.0.0+1
0.0.5 #
BREAKING CHANGES #
- Architectural Refactor & State Management:
- Removed
flutter_bloc: The dependency onflutter_blochas been completely removed. State management is now handled by a simpler controller pattern usingValueNotifierandListenable. Code usingBlocProviderorBlocBuildermust be migrated. - Renamed Main Widget: The primary widget
CameraPreviewViewhas been renamed toNativeCameraViewfor better clarity and consistency. All implementations must be updated.
- Removed
- Simplified Package Structure:
- Removed
plugin_platform_interface: This dependency has been removed to streamline the package architecture.
- Removed
0.0.4 #
- iOS:
- Critical Stability Fix (Lifecycle & Deinit): Resolved persistent
EXC_BREAKPOINT/EXC_BAD_ACCESScrashes duringdeinitby implementing a more robust and synchronized AVFoundation resource cleanup on thesessionQueue. This includes corrected order for removing outputs and nilling delegates (delegate is nilled after removal from session, all within the same synchronized block). - Preview Fit Enhancement (
containmode): Implemented top-alignment for the "contain" preview mode. When this mode is active, if the camera video's aspect ratio (when scaled to fill the view's width) results in a height shorter than the view, the preview will now fill the width and align to the top, rather than being vertically centered. - Feature: WYSIWYG Photo Cropping for "cover" mode (iOS): Captured photos in "cover" mode are now automatically cropped using Core Graphics to precisely match the visible area of the
AVCaptureVideoPreviewLayer. This calculation usesmetadataOutputRectConverted(fromLayerRect:)and the cropping process is performed asynchronously. - Swift Code Correctness: Fixed a
'guard' body must not fall throughcompiler warning insetupCameraby usingthrowfor early exit within ado-catchblock, improving the reliability of camera configuration. - Enhanced internal logging for easier debugging of camera lifecycle and preview adjustments.
- Critical Stability Fix (Lifecycle & Deinit): Resolved persistent
- Android:
- Feature: WYSIWYG Photo Cropping for "cover" mode.
- Implemented photo cropping for the "cover" preview fit mode (which uses
PreviewView.ScaleType.FILL_CENTERon Android). Photos captured usingImageCaptureare now automatically cropped to match the visible area displayed in thePreviewView. - This provides a "What You See Is What You Get" (WYSIWYG) experience, ensuring the final saved image corresponds to what the user saw.
- The cropping logic involves
Bitmapmanipulation and correctly handles EXIF orientation of the original image to ensure accurate cropping results.
- Implemented photo cropping for the "cover" preview fit mode (which uses
- Feature: WYSIWYG Photo Cropping for "cover" mode.
0.0.3 #
- iOS: Enhanced camera stability, fixed critical lifecycle bugs, and improved feature reliability.
- Resolved
EXC_BAD_ACCESScrashes encountered during camera switching by overhauling the resource deallocation process (deinit) and ensuring thread-safe operations for AVFoundation objects. - Corrected
switchCamerabehavior: The iOS native side now allows Flutter to manage view recreation, preventing conflicting camera setups and teardowns between old and new platform view instances. - Fixed an
NSGenericExceptioncaused by improperAVCaptureSession startRunning()calls relative tobeginConfiguration/commitConfiguration. - Addressed Swift-specific issues: resolved a force-unwrap error on non-optional
AVCaptureDeviceand aguardstatement fall-through warning during camera setup, improving code correctness. - Significantly improved the "capture last frame on pause" feature by utilizing
AVCaptureVideoDataOutputfor more reliable frame grabbing, fixing previous issues that resulted in blank images. - Strengthened
isDeinitializingchecks in delegate callbacks and various functions to improve safety during instance deallocation. - Ensured each
CameraPlatformViewinstance uses uniqueDispatchQueueinstances for itssessionQueueandvideoDataOutputQueueto prevent potential cross-instance conflicts.
- Resolved
0.0.2 #
- Update Example, Readme.md
0.0.1 #
- TODO: Describe initial release.