Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

add animation to all sections screen when it first appears after loading state

ashilkn775d1efe51b2
diff --git a/lib/ui/search_tab.dart b/lib/ui/search_tab.dart
index 99b0ae8b9a..719dc6e8f6 100644
--- a/lib/ui/search_tab.dart
+++ b/lib/ui/search_tab.dart
@@ -1,5 +1,6 @@
import "package:fade_indexed_stack/fade_indexed_stack.dart";
import "package:flutter/material.dart";
+import "package:flutter_animate/flutter_animate.dart";
import "package:photos/core/constants.dart";
import "package:photos/models/search/search_result.dart";
import "package:photos/models/search/search_types.dart";
@@ -94,7 +95,20 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
limit: searchSectionLimit,
);
},
- );
+ )
+ .animate(
+ delay: const Duration(milliseconds: 150),
+ )
+ .slide(
+ begin: const Offset(0, -0.015),
+ end: const Offset(0, 0),
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeOut,
+ )
+ .fadeIn(
+ duration: const Duration(milliseconds: 150),
+ curve: Curves.easeOut,
+ );
} else if (snapshot.hasError) {
//Errors are handled and this else if condition will be false always
//is the understanding.