@@ -38,7 +38,7 @@ class AssetPicker extends StatelessWidget {
38
38
),
39
39
gridCount = gridCount ?? 4 ,
40
40
themeColor =
41
- pickerTheme? .colorScheme? .primary ?? themeColor ?? C .themeColor,
41
+ pickerTheme? .colorScheme? .secondary ?? themeColor ?? C .themeColor,
42
42
super (key: key) {
43
43
Constants .textDelegate = textDelegate ?? DefaultTextDelegate ();
44
44
}
@@ -323,8 +323,8 @@ class AssetPicker extends StatelessWidget {
323
323
if (_.watch <AssetPickerProvider >().requestType ==
324
324
RequestType .audio) {
325
325
return ColoredBox (
326
- color: Colors .white12 ,
327
- child: Center (child: Icon (Icons .audiotrack)),
326
+ color: theme.colorScheme.primary. withOpacity ( 0.12 ) ,
327
+ child: const Center (child: Icon (Icons .audiotrack)),
328
328
);
329
329
}
330
330
@@ -340,7 +340,9 @@ class AssetPicker extends StatelessWidget {
340
340
fit: BoxFit .cover,
341
341
);
342
342
} else {
343
- return ColoredBox (color: Colors .white12);
343
+ return ColoredBox (
344
+ color: theme.colorScheme.primary.withOpacity (0.12 ),
345
+ );
344
346
}
345
347
},
346
348
),
@@ -364,8 +366,10 @@ class AssetPicker extends StatelessWidget {
364
366
),
365
367
Text (
366
368
'(${pathEntity .assetCount })' ,
367
- style:
368
- TextStyle (color: Colors .grey[600 ], fontSize: 18.0 ),
369
+ style: TextStyle (
370
+ color: theme.textTheme.caption.color,
371
+ fontSize: 18.0 ,
372
+ ),
369
373
maxLines: 1 ,
370
374
overflow: TextOverflow .ellipsis,
371
375
),
@@ -542,7 +546,7 @@ class AssetPicker extends StatelessWidget {
542
546
gradient: LinearGradient (
543
547
begin: AlignmentDirectional .bottomCenter,
544
548
end: AlignmentDirectional .topCenter,
545
- colors: < Color > [Colors .black45 , Colors .transparent],
549
+ colors: < Color > [theme.dividerColor , Colors .transparent],
546
550
),
547
551
),
548
552
child: Align (
@@ -619,12 +623,12 @@ class AssetPicker extends StatelessWidget {
619
623
gradient: LinearGradient (
620
624
begin: AlignmentDirectional .bottomCenter,
621
625
end: AlignmentDirectional .topCenter,
622
- colors: < Color > [Colors .black45 , Colors .transparent],
626
+ colors: < Color > [theme.dividerColor , Colors .transparent],
623
627
),
624
628
),
625
629
child: Row (
626
630
children: < Widget > [
627
- Icon (
631
+ const Icon (
628
632
Icons .videocam,
629
633
size: 24.0 ,
630
634
color: Colors .white,
@@ -633,7 +637,8 @@ class AssetPicker extends StatelessWidget {
633
637
padding: const EdgeInsets .only (left: 4.0 ),
634
638
child: Text (
635
639
Constants .textDelegate.durationIndicatorBuilder (
636
- Duration (seconds: asset.duration)),
640
+ Duration (seconds: asset.duration),
641
+ ),
637
642
style: const TextStyle (
638
643
color: Colors .white,
639
644
fontSize: 16.0 ,
@@ -670,7 +675,9 @@ class AssetPicker extends StatelessWidget {
670
675
},
671
676
child: AnimatedContainer (
672
677
duration: switchingPathDuration,
673
- color: selected ? Colors .black45 : Colors .black.withOpacity (0.1 ),
678
+ color: selected
679
+ ? theme.colorScheme.primary.withOpacity (0.45 )
680
+ : Colors .black.withOpacity (0.1 ),
674
681
),
675
682
), // 点击预览同目录下所有资源
676
683
);
@@ -718,7 +725,7 @@ class AssetPicker extends StatelessWidget {
718
725
reverseDuration: switchingPathDuration,
719
726
child: selected
720
727
? isSingleAssetMode
721
- ? Icon (Icons .check, size: 18.0 )
728
+ ? const Icon (Icons .check, size: 18.0 )
722
729
: Text (
723
730
'${selectedAssets .indexOf (asset ) + 1 }' ,
724
731
style: TextStyle (
@@ -742,10 +749,7 @@ class AssetPicker extends StatelessWidget {
742
749
child: Text (
743
750
Constants .textDelegate.loadFailed,
744
751
textAlign: TextAlign .center,
745
- style: const TextStyle (
746
- color: Colors .white,
747
- fontSize: 18.0 ,
748
- ),
752
+ style: const TextStyle (fontSize: 18.0 ),
749
753
),
750
754
);
751
755
@@ -837,7 +841,7 @@ class AssetPicker extends StatelessWidget {
837
841
),
838
842
),
839
843
),
840
- Center (child: Icon (Icons .audiotrack)),
844
+ const Center (child: Icon (Icons .audiotrack)),
841
845
_selectedBackdrop (context, index, asset),
842
846
audioIndicator (asset),
843
847
],
@@ -951,7 +955,9 @@ class AssetPicker extends StatelessWidget {
951
955
'(${provider .selectedAssets .length })'
952
956
: Constants .textDelegate.preview,
953
957
style: TextStyle (
954
- color: isSelectedNotEmpty ? null : Colors .grey[600 ],
958
+ color: isSelectedNotEmpty
959
+ ? null
960
+ : theme.textTheme.caption.color,
955
961
fontSize: 18.0 ,
956
962
),
957
963
);
@@ -1018,7 +1024,7 @@ class AssetPicker extends StatelessWidget {
1018
1024
)
1019
1025
: IconButton (
1020
1026
onPressed: Navigator .of (context).maybePop,
1021
- icon: Icon (Icons .close),
1027
+ icon: const Icon (Icons .close),
1022
1028
),
1023
1029
);
1024
1030
0 commit comments