FilterOptionGroup class

A collection of filtering and sorting options for querying assets.

Use this class to specify how to filter and sort a set of assets returned by PhotoManager.

The FilterOptionGroup object contains several FilterOption objects, one for each type of asset (image, video, audio). You can set specific filtering and sorting options for each type of asset using the corresponding FilterOption object.

Additionally, you can specify whether to include modified path results, whether to include live photos, or whether to only include live photos, using the appropriate properties of this object.

Finally, you can use the orders property to specify sorting options for the results.

Inheritance

Constructors

FilterOptionGroup({FilterOption imageOption = const FilterOption(), FilterOption videoOption = const FilterOption(), FilterOption audioOption = const FilterOption(), bool containsPathModified = false, @Deprecated('The option will be always enabled by default. ' 'This will be removed in v4.0.0') bool containsLivePhotos = true, bool onlyLivePhotos = false, DateTimeCond? createTimeCond, DateTimeCond? updateTimeCond, List<OrderOption> orders = const <OrderOption>[]})
Construct a default options group.
FilterOptionGroup.empty()
Construct an empty options group.

Properties

containsLivePhotos bool
Whether the result should contain live photos.
getter/setter pair
containsPathModified bool
Whether the AssetPathEntitys will return with modified time.
getter/setter pairinherited
createTimeCond DateTimeCond
The condition for filtering asset creation time.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
onlyLivePhotos bool
Whether to obtain only live photos.
getter/setter pair
orders List<OrderOption>
A list of options for sorting the results.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type BaseFilterType
The type of the filter.
no setteroverride
updateTimeCond DateTimeCond
The condition for filtering asset update time.
getter/setter pair

Methods

addOrderOption(OrderOption option) → void
Adds an OrderOption to the list of sorting options.
childMap() Map<String, dynamic>
The child map of the filter.
override
copyWith({FilterOption? imageOption, FilterOption? videoOption, FilterOption? audioOption, bool? containsPathModified, bool? containsLivePhotos, bool? onlyLivePhotos, DateTimeCond? createTimeCond, DateTimeCond? updateTimeCond, List<OrderOption>? orders}) FilterOptionGroup
Returns a new FilterOptionGroup with the same options as this one, but with some options replaced.
getOption(AssetType type) FilterOption
Get the FilterOption object for the specified AssetType.
merge(FilterOptionGroup other) → void
Merges another FilterOptionGroup into this one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setOption(AssetType type, FilterOption option) → void
Set the FilterOption object for the specified AssetType.
toMap() Map<String, dynamic>
Convert the filter to a map for channel.
inherited
toString() String
A string representation of this object.
override
updateDateToNow() FilterOptionGroup
The method only supports for FilterOptionGroup.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited