kutu_asset_picker 0.2.0
kutu_asset_picker: ^0.2.0 copied to clipboard
A themeable Flutter gallery picker with device-side crop for photos and video: per-asset aspect ratios, trim, cover frames, and a designed limited-access state.
0.2.0 #
Breaking. The camera cell works. It never could before: KutuAssetPicker.show
and AssetPickerScope accepted no delegate, and 0.1.1's root-container fix closed
the only other route a host had.
KutuAssetPicker.showandAssetPickerScopetake acamera:delegate.PickerCameraDelegate.capturenow returnsCapturedMedia?(a file plus its kind) instead ofPickerAsset?. A host no longer saves to the photo library and therefore needs nophoto_managerdependency of its own.AssetSourcegainssaveToLibrary, which is where that write now happens. Anyone implementingAssetSourcemust add it.- New
AssetPickerText.pickerCaptureFailed. A denied camera permission or a refused library write is now visible in the cell rather than silent. Anyone subclassingAssetPickerTextmust add it. The shipped English and Turkish implementations already have it, so only a direct subclass is affected.
0.1.1 #
- Fixed: the picker showed "photo access is off" and never asked the OS
when the host app already had a root
ProviderScope— which every Riverpod app does.AssetPickerScopenested aProviderScope(overrides:)under the host's, making it a child scope; providers the picker does not override, such as its permission provider, then resolved at the host's root, where the injection providers throw by design, and the gate rendered that error as a denial. The scope now owns a root container of its own. The example app has no root scope, which is why it never reproduced. - Documented that a consumer embedding
AssetPickerViewdirectly must give it a root container (UncontrolledProviderScopeover a freshProviderContainer) or override the injection providers at their own root, not a nestedProviderScope(overrides:).
0.1.0 #
First release.
KutuAssetPicker.showfor the convenience path andAssetPickerViewfor embedding inside an existing route; the convenience helper is a wrapper over the widget, not the other way round, so the package never owns yourNavigator.- Paged gallery grid over
photo_manager, behind the injectableAssetSourceseam. Thumbnails go throughPickerAssetImageProvider, whose value equality is the deduplication mechanism, so scroll-aware decode deferral works. - Full, limited and denied permission states are all designed. Limited access renders the same grid over the granted subset with a persistent Manage selection bar, and the empty state never claims the library is empty.
- Crop step with pan and pinch-zoom against a fixed window, the rest of the media showing dimmed beyond it and draggable from there, per-asset aspect ratios, an Apply to all affordance, and crop state preserved across asset switching.
- Video is cropped, trimmed and given a cover frame on device, through
kutu_media_transform. The trim and cover controls sit in a band under the crop window, reserved for the whole session so the window never resizes between a photo and a video. The kept range can be dragged as a whole, and played, looping, with a playhead on the filmstrip to drag a trim handle towards; in cover mode pausing picks the frame. AssetPickerConfigfor behaviour,AssetPickerTheme(aThemeExtension, every field nullable, falling back toColorScheme) for looks, andAssetPickerTextfor copy, with English and Turkish shipped.- Exports run strictly one at a time, are cancellable as a batch, and report progress per asset; one failed asset does not fail the batch.
package:kutu_asset_picker/testing.dartexportsFakeAssetSource.
