FilterOptionGroup constructor
FilterOptionGroup({
- FilterOption imageOption = const FilterOption(),
- FilterOption videoOption = const FilterOption(),
- FilterOption audioOption = const FilterOption(),
- bool containsPathModified = false,
- bool containsLivePhotos = true,
- bool onlyLivePhotos = false,
- DateTimeCond? createTimeCond,
- DateTimeCond? updateTimeCond,
- List<
OrderOption> orders = const <OrderOption>[],
Construct a default options group.
Parameters:
imageOption
: The option for filtering image assets. Defaults to FilterOption.videoOption
: The option for filtering video assets. Defaults to FilterOption.audioOption
: The option for filtering audio assets. Defaults to FilterOption.containsPathModified
: Whether the result should contain assets whose file path has been modified. Defaults tofalse
.containsLivePhotos
: Whether the result should contain live photos. This option only takes effects on iOS. Defaults totrue
.onlyLivePhotos
: Whether the result should only contain live photos. This option only takes effects on iOS and when the request type is image. Defaults tofalse
.createTimeCond
: The condition for filtering asset creation time. See DateTimeCond for more information. Defaults toDateTimeCond.def()
.updateTimeCond
: The condition for filtering asset update time. See DateTimeCond for more information. By default, this option is ignored.orders
: A list of options for sorting the results. Defaults to an empty list.
Implementation
FilterOptionGroup({
FilterOption imageOption = const FilterOption(),
FilterOption videoOption = const FilterOption(),
FilterOption audioOption = const FilterOption(),
bool containsPathModified = false,
this.containsLivePhotos = true,
this.onlyLivePhotos = false,
DateTimeCond? createTimeCond,
DateTimeCond? updateTimeCond,
List<OrderOption> orders = const <OrderOption>[],
}) {
super.containsPathModified = containsPathModified;
_map[AssetType.image] = imageOption;
_map[AssetType.video] = videoOption;
_map[AssetType.audio] = audioOption;
this.createTimeCond = createTimeCond ?? this.createTimeCond;
this.updateTimeCond = updateTimeCond ?? this.updateTimeCond;
this.orders.addAll(orders);
}