@@ -75,6 +75,7 @@ class AssetPicker extends StatelessWidget {
75
75
RequestType requestType = RequestType .image,
76
76
List <AssetEntity > selectedAssets,
77
77
Color themeColor = C .themeColor,
78
+ ThemeData pickerTheme,
78
79
TextDelegate textDelegate,
79
80
Curve routeCurve = Curves .easeIn,
80
81
Duration routeDuration = const Duration (milliseconds: 300 ),
@@ -83,6 +84,10 @@ class AssetPicker extends StatelessWidget {
83
84
pageSize % gridCount == 0 || pageSize == null ,
84
85
'pageSize must be a multiple of gridCount.' ,
85
86
);
87
+ assert (
88
+ pickerTheme == null || themeColor == null ,
89
+ 'Theme and theme color cannot be set at the same time.' ,
90
+ );
86
91
try {
87
92
final bool isPermissionGranted = await PhotoManager .requestPermission ();
88
93
if (isPermissionGranted) {
@@ -100,6 +105,7 @@ class AssetPicker extends StatelessWidget {
100
105
gridCount: gridCount,
101
106
textDelegate: textDelegate,
102
107
themeColor: themeColor,
108
+ pickerTheme: pickerTheme,
103
109
);
104
110
final List <AssetEntity > result =
105
111
await Navigator .of (context).push <List <AssetEntity >>(
0 commit comments