[mob][photos] Added animation
This commit is contained in:
@@ -58,7 +58,7 @@ class _AllQuickLinksPageState extends State<AllQuickLinksPage> {
|
||||
});
|
||||
}
|
||||
|
||||
Future<bool> _removeQuickLink() async {
|
||||
Future<bool> _removeQuickLinks() async {
|
||||
if (selectedQuickLinks.isEmpty) {
|
||||
await showErrorDialog(
|
||||
context,
|
||||
@@ -131,7 +131,7 @@ class _AllQuickLinksPageState extends State<AllQuickLinksPage> {
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await _removeQuickLink();
|
||||
await _removeQuickLinks();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.remove_circle_outline_outlined,
|
||||
|
||||
@@ -22,14 +22,16 @@ class QuickLinkAlbumItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool isSelected = selectedQuickLinks.contains(c);
|
||||
final colorScheme = getEnteColorScheme(context);
|
||||
final textTheme = getEnteTextTheme(context);
|
||||
return Container(
|
||||
return AnimatedContainer(
|
||||
curve: Curves.easeOut,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: selectedQuickLinks.contains(c)
|
||||
? colorScheme.strokeMuted
|
||||
: colorScheme.strokeFainter,
|
||||
color:
|
||||
isSelected ? colorScheme.strokeMuted : colorScheme.strokeFainter,
|
||||
),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(2),
|
||||
@@ -137,16 +139,18 @@ class QuickLinkAlbumItem extends StatelessWidget {
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 210),
|
||||
duration: const Duration(milliseconds: 200),
|
||||
switchInCurve: Curves.easeOut,
|
||||
switchOutCurve: Curves.easeIn,
|
||||
child: selectedQuickLinks.contains(c)
|
||||
child: isSelected
|
||||
? IconButtonWidget(
|
||||
key: ValueKey(isSelected),
|
||||
icon: Icons.check_circle_rounded,
|
||||
iconButtonType: IconButtonType.secondary,
|
||||
iconColor: colorScheme.blurStrokeBase,
|
||||
)
|
||||
: const IconButtonWidget(
|
||||
: IconButtonWidget(
|
||||
key: ValueKey(isSelected),
|
||||
icon: Icons.chevron_right_outlined,
|
||||
iconButtonType: IconButtonType.secondary,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user