From a15acab4cddb32a2873accadf958ad5d68874e9d Mon Sep 17 00:00:00 2001 From: "Omer I.S." Date: Tue, 9 Jun 2026 04:25:32 +0300 Subject: [PATCH] fix: progress bar visibility, title spacing, and import/export button scope --- README.md | 4 +-- lib/pages/add_app.dart | 56 +++++++++++++----------------------------- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 73a75c3f9..f0867aa35 100644 --- a/README.md +++ b/README.md @@ -93,13 +93,13 @@ A: It's easy to update to Updatium from Obtainium, by following these steps: On Obtainium: -1. Tap on Import/Export -> Pick export directory. +1. Tap on Import/Export → Pick export directory. 2. Choose a directory path and confirm. 3. Tap on "Obtainium export" and confirm. On Updatium: -1. Tap on Add App -> Import/Export -> Updatium import. +1. Tap on Add App → Import/Export → Updatium import. 2. Locate Obtainium export file, tap on it, and confirm. Welcome to Updatium :) ### Q: How can I help? diff --git a/lib/pages/add_app.dart b/lib/pages/add_app.dart index 2da766370..e9a20869e 100644 --- a/lib/pages/add_app.dart +++ b/lib/pages/add_app.dart @@ -1,11 +1,9 @@ -import 'package:animations/animations.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:m3e_buttons/m3e_buttons.dart'; import 'package:updatium/components/generated_form.dart'; import 'package:updatium/main.dart'; import 'package:updatium/pages/app.dart'; -import 'package:updatium/pages/import_export.dart'; import 'package:updatium/pages/settings.dart'; import 'package:updatium/providers/apps_provider.dart'; import 'package:updatium/providers/notifications_provider.dart'; @@ -609,13 +607,18 @@ class AddAppPageState extends State { SliverAppBar.large( pinned: true, title: Text(t('addApp')), - bottom: PreferredSize( - preferredSize: const Size.fromHeight(4), - child: AppAddingProgressBar( - currentStep: 1, - totalSteps: (searching || searchQuery.isNotEmpty) ? 3 : 2, - ), - ), + bottom: (pickedSource != null || searching || searchQuery.isNotEmpty) + ? PreferredSize( + preferredSize: const Size.fromHeight(8), + child: Padding( + padding: const EdgeInsets.only(top: 4), + child: AppAddingProgressBar( + currentStep: 1, + totalSteps: (searching || searchQuery.isNotEmpty) ? 3 : 2, + ), + ), + ) + : null, ), SliverToBoxAdapter( child: Padding( @@ -1186,37 +1189,12 @@ class AddAppConfirmationPageState extends State { ), ), ], - ), - floatingActionButton: FloatingActionButton.extended( - onPressed: () { - Navigator.push( - context, - PageRouteBuilder( - pageBuilder: (context, animation, secondaryAnimation) => - const ImportExportPage(), - transitionsBuilder: - (context, animation, secondaryAnimation, child) { - return SharedAxisTransition( - animation: animation, - secondaryAnimation: secondaryAnimation, - transitionType: SharedAxisTransitionType.vertical, - child: child, - ); - }, - ), - ); - }, - icon: const Icon(Icons.import_export), - label: Text(t('importExport')), - extendedPadding: const EdgeInsets.symmetric(horizontal: 20), - elevation: 3, - backgroundColor: Theme.of(context).colorScheme.primaryContainer, - foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer, - ), - ), - ); + ), + // Removed Import/Export button as it should only appear on the main screen. + ), + ); + } } -} class SelectionModal extends StatefulWidget { const SelectionModal({