@@ -686,6 +686,7 @@ class AssetPicker extends StatelessWidget {
686
686
provider.selectedAssets,
687
687
builder: (BuildContext _, List <AssetEntity > selectedAssets, Widget __) {
688
688
final bool selected = selectedAssets.contains (asset);
689
+ final double indicatorSize = Screens .width / gridCount / 3 ;
689
690
return Positioned (
690
691
top: 0.0 ,
691
692
right: 0.0 ,
@@ -701,33 +702,40 @@ class AssetPicker extends StatelessWidget {
701
702
provider.selectAsset (asset);
702
703
}
703
704
},
704
- child: AnimatedContainer (
705
- duration: switchingPathDuration,
706
- margin: EdgeInsets .all (isAppleOS ? 10.0 : 6.0 ),
707
- width: isAppleOS ? 28.0 : 20.0 ,
708
- height: isAppleOS ? 28.0 : 20.0 ,
709
- decoration: BoxDecoration (
710
- border: ! selected
711
- ? Border .all (color: Colors .white, width: 2.0 )
712
- : null ,
713
- color: selected ? themeColor : null ,
714
- shape: BoxShape .circle,
715
- ),
716
- child: AnimatedSwitcher (
705
+ child: Container (
706
+ margin: EdgeInsets .all (
707
+ Screens .width / gridCount / (isAppleOS ? 12.0 : 15.0 )),
708
+ width: indicatorSize,
709
+ height: indicatorSize,
710
+ alignment: AlignmentDirectional .topEnd,
711
+ child: AnimatedContainer (
717
712
duration: switchingPathDuration,
718
- reverseDuration: switchingPathDuration,
719
- child: selected
720
- ? isSingleAssetMode
721
- ? Icon (Icons .check, size: 18.0 )
722
- : Text (
723
- '${selectedAssets .indexOf (asset ) + 1 }' ,
724
- style: TextStyle (
725
- fontSize: isAppleOS ? 16.0 : 14.0 ,
726
- fontWeight:
727
- isAppleOS ? FontWeight .w600 : FontWeight .bold,
728
- ),
729
- )
730
- : const SizedBox .shrink (),
713
+ width: indicatorSize / (isAppleOS ? 1.25 : 1.5 ),
714
+ height: indicatorSize / (isAppleOS ? 1.25 : 1.5 ),
715
+ decoration: BoxDecoration (
716
+ border: ! selected
717
+ ? Border .all (color: Colors .white, width: 2.0 )
718
+ : null ,
719
+ color: selected ? themeColor : null ,
720
+ shape: BoxShape .circle,
721
+ ),
722
+ child: AnimatedSwitcher (
723
+ duration: switchingPathDuration,
724
+ reverseDuration: switchingPathDuration,
725
+ child: selected
726
+ ? isSingleAssetMode
727
+ ? Icon (Icons .check, size: 18.0 )
728
+ : Text (
729
+ '${selectedAssets .indexOf (asset ) + 1 }' ,
730
+ style: TextStyle (
731
+ fontSize: isAppleOS ? 16.0 : 14.0 ,
732
+ fontWeight: isAppleOS
733
+ ? FontWeight .w600
734
+ : FontWeight .bold,
735
+ ),
736
+ )
737
+ : const SizedBox .shrink (),
738
+ ),
731
739
),
732
740
),
733
741
),
0 commit comments