FilterOptionGroup constructor

FilterOptionGroup({
  1. FilterOption imageOption = const FilterOption(),
  2. FilterOption videoOption = const FilterOption(),
  3. FilterOption audioOption = const FilterOption(),
  4. bool containsPathModified = false,
  5. bool containsLivePhotos = false,
  6. bool onlyLivePhotos = false,
  7. DateTimeCond? createTimeCond,
  8. DateTimeCond? updateTimeCond,
  9. 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 to false.
  • containsLivePhotos: Whether the result should contain live photos. This option only takes effects on iOS. Defaults to true.
  • onlyLivePhotos: Whether the result should only contain live photos. This option only takes effects on iOS and when the request type is image. Defaults to false.
  • createTimeCond: The condition for filtering asset creation time. See DateTimeCond for more information. Defaults to DateTimeCond.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 = false,
  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);
}