瀏覽代碼

Remove hero animation during sign_up screen transition

Neeraj Gupta 3 年之前
父節點
當前提交
13f27f59ad
共有 3 個文件被更改,包括 22 次插入32 次删除
  1. 10 13
      lib/ui/email_entry_page.dart
  2. 3 6
      lib/ui/landing_page_widget.dart
  3. 9 13
      lib/ui/ott_verification_page.dart

+ 10 - 13
lib/ui/email_entry_page.dart

@@ -87,19 +87,16 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
           Navigator.of(context).pop();
         },
       ),
-      title: Hero(
-        tag: "sign_up",
-        child: Material(
-            type: MaterialType.transparency,
-            child: StepProgressIndicator(
-              totalSteps: 4,
-              currentStep: 1,
-              selectedColor: Theme.of(context).buttonColor,
-              roundedEdges: Radius.circular(10),
-              unselectedColor:
-                  Theme.of(context).colorScheme.stepProgressUnselectedColor,
-            )),
-      ),
+      title: Material(
+          type: MaterialType.transparency,
+          child: StepProgressIndicator(
+            totalSteps: 4,
+            currentStep: 1,
+            selectedColor: Theme.of(context).buttonColor,
+            roundedEdges: Radius.circular(10),
+            unselectedColor:
+                Theme.of(context).colorScheme.stepProgressUnselectedColor,
+          )),
     );
     return Scaffold(
       appBar: appBar,

+ 3 - 6
lib/ui/landing_page_widget.dart

@@ -125,12 +125,9 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {
       width: double.infinity,
       padding: EdgeInsets.symmetric(horizontal: 20),
       child: GradientButton(
-        child: Hero(
-          tag: "sign_up",
-          child: Text(
-            "New to ente",
-            style: gradientButtonTextTheme(),
-          ),
+        child: Text(
+          "New to ente",
+          style: gradientButtonTextTheme(),
         ),
         linearGradientColors: const [
           Color(0xFF2CD267),

+ 9 - 13
lib/ui/ott_verification_page.dart

@@ -47,19 +47,15 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
           },
         ),
         title: widget.isCreateAccountScreen
-            ? Hero(
-                tag: "sign_up",
-                child: Material(
-                  type: MaterialType.transparency,
-                  child: StepProgressIndicator(
-                    totalSteps: 4,
-                    currentStep: 2,
-                    selectedColor: Theme.of(context).buttonColor,
-                    roundedEdges: Radius.circular(10),
-                    unselectedColor: Theme.of(context)
-                        .colorScheme
-                        .stepProgressUnselectedColor,
-                  ),
+            ? Material(
+                type: MaterialType.transparency,
+                child: StepProgressIndicator(
+                  totalSteps: 4,
+                  currentStep: 2,
+                  selectedColor: Theme.of(context).buttonColor,
+                  roundedEdges: Radius.circular(10),
+                  unselectedColor:
+                      Theme.of(context).colorScheme.stepProgressUnselectedColor,
                 ),
               )
             : null,