@@ -57,6 +57,15 @@ class PhotoProvider extends ChangeNotifier {
5757 notifyListeners ();
5858 }
5959
60+ bool _includeHiddenAssets = false ;
61+
62+ bool get includeHiddenAssets => _includeHiddenAssets;
63+
64+ set includeHiddenAssets (bool value) {
65+ _includeHiddenAssets = value;
66+ notifyListeners ();
67+ }
68+
6069 DateTime _startDt = DateTime (2005 ); // Default Before 8 years
6170
6271 DateTime get startDt => _startDt;
@@ -168,6 +177,13 @@ class PhotoProvider extends ChangeNotifier {
168177 containsPathModified = value;
169178 }
170179
180+ void changeIncludeHiddenAssets (bool ? value) {
181+ if (value == null ) {
182+ return ;
183+ }
184+ includeHiddenAssets = value;
185+ }
186+
171187 void reset () {
172188 list.clear ();
173189 }
@@ -191,13 +207,13 @@ class PhotoProvider extends ChangeNotifier {
191207 }
192208
193209 FilterOptionGroup makeOption () {
194- final FilterOption option = FilterOption (
210+ final FilterOption filterOption = FilterOption (
195211 sizeConstraint: SizeConstraint (
196212 minWidth: int .tryParse (minWidth) ?? 0 ,
197213 maxWidth: int .tryParse (maxWidth) ?? 100000 ,
198214 minHeight: int .tryParse (minHeight) ?? 0 ,
199215 maxHeight: int .tryParse (maxHeight) ?? 100000 ,
200- ignoreSize: ignoreSize ,
216+ ignoreSize: _ignoreSize ,
201217 ),
202218 durationConstraint: DurationConstraint (
203219 min: minDuration,
@@ -211,15 +227,19 @@ class PhotoProvider extends ChangeNotifier {
211227 max: endDt,
212228 );
213229
214- return FilterOptionGroup ()
215- ..setOption (AssetType .video, option)
216- ..setOption (AssetType .image, option)
217- ..setOption (AssetType .audio, option)
218- ..createTimeCond = createDtCond
219- ..containsPathModified = _containsPathModified
230+ final FilterOptionGroup optionGroup = FilterOptionGroup (
231+ imageOption: filterOption,
232+ videoOption: filterOption,
233+ audioOption: filterOption,
234+ containsPathModified: containsPathModified,
220235 // ignore: deprecated_member_use
221- ..containsLivePhotos = _containsLivePhotos
222- ..onlyLivePhotos = onlyLivePhotos;
236+ containsLivePhotos: containsLivePhotos,
237+ onlyLivePhotos: onlyLivePhotos,
238+ createTimeCond: createDtCond,
239+ includeHiddenAssets: includeHiddenAssets, // iOS 平台特有
240+ );
241+
242+ return optionGroup;
223243 }
224244
225245 Future <void > refreshAllGalleryProperties () async {
0 commit comments