Skip to content

Commit 65c19e4

Browse files
committed
🐛 Flip reverted flag judgement.
1 parent 7de6eea commit 65c19e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/src/widget/asset_picker.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ class AssetPicker extends StatelessWidget {
8383
if (maxAssets == null || maxAssets < 1) {
8484
throw ArgumentError('maxAssets must be greater than 1.');
8585
}
86-
if (pageSize % gridCount == 0 || pageSize == null) {
86+
if (pageSize != null && pageSize % gridCount != 0) {
8787
throw ArgumentError('pageSize must be a multiple of gridCount.');
8888
}
89-
if (pickerTheme == null || themeColor == null) {
90-
throw ArgumentError('Theme and theme color cannot be set at the same time.');
89+
if (pickerTheme != null && themeColor != null) {
90+
throw ArgumentError(
91+
'Theme and theme color cannot be set at the same time.');
9192
}
9293
try {
9394
final bool isPermissionGranted = await PhotoManager.requestPermission();

0 commit comments

Comments
 (0)