File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ that can be found in the LICENSE file. -->
12
12
** Improvements**
13
13
14
14
- Improve how ` MediaQuery ` is being listened.
15
+ - Stop enabling drag to select when ` maxAssets == 1 ` .
15
16
16
17
## 9.5.1
17
18
Original file line number Diff line number Diff line change @@ -213,6 +213,9 @@ class AssetPickerConfig {
213
213
///
214
214
/// The feature enables by default if no accessibility service is being used.
215
215
/// 在未使用辅助功能的情况下会默认启用该功能。
216
+ ///
217
+ /// The feature is not available when `maxAssets` is `1` .
218
+ /// 当 `maxAssets` 为 `1` 时,该功能不可用。
216
219
/// {@endtemplate}
217
220
final bool ? dragToSelect;
218
221
}
Original file line number Diff line number Diff line change @@ -1372,8 +1372,12 @@ class DefaultAssetPickerBuilderDelegate
1372
1372
specialItem: specialItem,
1373
1373
);
1374
1374
1375
- // Enables drag-to-select.
1376
- if (dragToSelect ?? ! accessibleNavigation) {
1375
+ // Enables drag-to-select when:
1376
+ // 1. The feature is enabled manually.
1377
+ // 2. The accessibility service is not being used.
1378
+ // 3. The picker is not in single asset mode.
1379
+ if ((dragToSelect ?? ! accessibleNavigation) &&
1380
+ ! isSingleAssetMode) {
1377
1381
child = GestureDetector (
1378
1382
excludeFromSemantics: true ,
1379
1383
onHorizontalDragStart: (d) {
You can’t perform that action at this time.
0 commit comments