Skip to content

Commit 72960c0

Browse files
committed
Add permission state in special item builder.
1 parent be8fdf5 commit 72960c0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

example/lib/constants/picker_method.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class PickMethod {
142142
BuildContext context,
143143
AssetPathEntity? path,
144144
int length,
145-
bool isPermissionLimited,
145+
PermissionState permissionState,
146146
) {
147147
if (path?.isAll != true) {
148148
return null;
@@ -199,7 +199,7 @@ class PickMethod {
199199
BuildContext context,
200200
AssetPathEntity? path,
201201
int length,
202-
bool isPermissionLimited,
202+
PermissionState permissionState,
203203
) {
204204
if (path?.isAll != true) {
205205
return null;
@@ -314,7 +314,7 @@ class PickMethod {
314314
BuildContext context,
315315
AssetPathEntity? path,
316316
int length,
317-
bool isPermissionLimited,
317+
PermissionState permissionState,
318318
) {
319319
return const Center(
320320
child: Text('Custom Widget', textAlign: TextAlign.center),
@@ -349,7 +349,7 @@ class PickMethod {
349349
BuildContext context,
350350
AssetPathEntity? path,
351351
int length,
352-
bool isPermissionLimited,
352+
PermissionState permissionState,
353353
) {
354354
return const Center(
355355
child: Text('Prepand Widget', textAlign: TextAlign.center),
@@ -362,7 +362,7 @@ class PickMethod {
362362
BuildContext context,
363363
AssetPathEntity? path,
364364
int length,
365-
bool isPermissionLimited,
365+
PermissionState permissionState,
366366
) {
367367
return const Center(
368368
child: Text('Append Widget', textAlign: TextAlign.center),

lib/src/constants/typedefs.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ typedef SpecialItemBuilder<Path> = Widget? Function(
3131
BuildContext context,
3232
Path? path,
3333
int length,
34-
bool isPermissionLimited,
34+
PermissionState permissionState,
3535
);
3636

3737
/// {@template wechat_assets_picker.AssetSelectPredicate}

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ class DefaultAssetPickerBuilderDelegate
12421242
context,
12431243
wrapper?.path,
12441244
totalCount,
1245-
isPermissionLimited,
1245+
permissionNotifier.value,
12461246
)
12471247
);
12481248
})

0 commit comments

Comments
 (0)