Skip to content

armgit / ente

Public Imported from GitHub
0

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

add animation between search screens inside indexedStack

ashilknbc31578edd9d
diff --git a/lib/ui/search_tab.dart b/lib/ui/search_tab.dart
index 682c10bc1b..a180ba9df9 100644
--- a/lib/ui/search_tab.dart
+++ b/lib/ui/search_tab.dart
@@ -1,3 +1,4 @@
+import "package:fade_indexed_stack/fade_indexed_stack.dart";
import "package:flutter/material.dart";
import "package:photos/core/constants.dart";
import "package:photos/models/search/search_result.dart";
@@ -42,7 +43,8 @@ class _SearchTabState extends State<SearchTab> {
return Padding(
padding: const EdgeInsets.only(top: 8),
child: AllSectionsExamplesProvider(
- child: IndexedStack(
+ child: FadeIndexedStack(
+ duration: const Duration(milliseconds: 150),
index: index,
children: [
const AllSearchSections(),
diff --git a/pubspec.lock b/pubspec.lock
index a034f8c8c3..49dcaabbe7 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -460,6 +460,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.6.0"
+ fade_indexed_stack:
+ dependency: "direct main"
+ description:
+ name: fade_indexed_stack
+ sha256: "0d625709d0bf6d0fa275cfa4eba84695fdea93d672c47413cdb49bcbe758a9f3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2"
fake_async:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 66a0447616..5da4a9eb37 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -53,6 +53,7 @@ dependencies:
expandable: ^5.0.1
expansion_tile_card: ^3.0.0
extended_image: ^8.1.1
+ fade_indexed_stack: ^0.2.2
fast_base58: ^0.2.1
# https://github.com/incrediblezayed/file_saver/issues/86
file_saver: 0.2.8