@@ -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
);
@@ -728,6 +735,9 @@ class AssetPicker extends StatelessWidget {
728
735
: Text (
729
736
'${selectedAssets .indexOf (asset ) + 1 }' ,
730
737
style: TextStyle (
738
+ color: selected
739
+ ? theme.textTheme.bodyText1.color
740
+ : null ,
731
741
fontSize: isAppleOS ? 16.0 : 14.0 ,
732
742
fontWeight: isAppleOS
733
743
? FontWeight .w600
@@ -750,10 +760,7 @@ class AssetPicker extends StatelessWidget {
750
760
child: Text (
751
761
Constants .textDelegate.loadFailed,
752
762
textAlign: TextAlign .center,
753
- style: const TextStyle (
754
- color: Colors .white,
755
- fontSize: 18.0 ,
756
- ),
763
+ style: const TextStyle (fontSize: 18.0 ),
757
764
),
758
765
);
759
766
@@ -845,7 +852,7 @@ class AssetPicker extends StatelessWidget {
845
852
),
846
853
),
847
854
),
848
- Center (child: Icon (Icons .audiotrack)),
855
+ const Center (child: Icon (Icons .audiotrack)),
849
856
_selectedBackdrop (context, index, asset),
850
857
audioIndicator (asset),
851
858
],
@@ -959,7 +966,9 @@ class AssetPicker extends StatelessWidget {
959
966
'(${provider .selectedAssets .length })'
960
967
: Constants .textDelegate.preview,
961
968
style: TextStyle (
962
- color: isSelectedNotEmpty ? null : Colors .grey[600 ],
969
+ color: isSelectedNotEmpty
970
+ ? null
971
+ : theme.textTheme.caption.color,
963
972
fontSize: 18.0 ,
964
973
),
965
974
);
@@ -1026,7 +1035,7 @@ class AssetPicker extends StatelessWidget {
1026
1035
)
1027
1036
: IconButton (
1028
1037
onPressed: Navigator .of (context).maybePop,
1029
- icon: Icon (Icons .close),
1038
+ icon: const Icon (Icons .close),
1030
1039
),
1031
1040
);
1032
1041
0 commit comments