File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,12 @@ class AssetPicker extends StatelessWidget {
83
83
if (maxAssets == null || maxAssets < 1 ) {
84
84
throw ArgumentError ('maxAssets must be greater than 1.' );
85
85
}
86
- if (pageSize % gridCount == 0 || pageSize == null ) {
86
+ if (pageSize != null && pageSize % gridCount != 0 ) {
87
87
throw ArgumentError ('pageSize must be a multiple of gridCount.' );
88
88
}
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.' );
91
92
}
92
93
try {
93
94
final bool isPermissionGranted = await PhotoManager .requestPermission ();
You can’t perform that action at this time.
0 commit comments