Add reverse transition animation toggle (#683)

This commit is contained in:
Imran Remtulla
2023-07-16 11:41:02 -04:00
parent 6b16857186
commit 1c390a7f04
14 changed files with 38 additions and 1 deletions

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "App entfernen?", "one": "App entfernen?",
"other": "Apps entfernen?" "other": "Apps entfernen?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Remove App?", "one": "Remove App?",
"other": "Remove Apps?" "other": "Remove Apps?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "¿Eliminar Aplicación?", "one": "¿Eliminar Aplicación?",
"other": "¿Eliminar Aplicaciones?" "other": "¿Eliminar Aplicaciones?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "برنامه حذف شود؟", "one": "برنامه حذف شود؟",
"other": "برنامه ها حذف شوند؟" "other": "برنامه ها حذف شوند؟"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Supprimer l'application ?", "one": "Supprimer l'application ?",
"other": "Supprimer les applications ?" "other": "Supprimer les applications ?"

View File

@ -237,6 +237,7 @@
"pickHighestVersionCode": "A legmagasabb verziószámú APK auto. kiválasztása", "pickHighestVersionCode": "A legmagasabb verziószámú APK auto. kiválasztása",
"checkUpdateOnDetailPage": "Frissítések keresése az app részleteit tartalmazó oldal megnyitásakor", "checkUpdateOnDetailPage": "Frissítések keresése az app részleteit tartalmazó oldal megnyitásakor",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?", "one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazást?" "other": "Eltávolítja az alkalmazást?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Rimuovere l'app?", "one": "Rimuovere l'app?",
"other": "Rimuovere le app?" "other": "Rimuovere le app?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "最も高いバージョンコードのAPKを自動的に選択する", "pickHighestVersionCode": "最も高いバージョンコードのAPKを自動的に選択する",
"checkUpdateOnDetailPage": "アプリの詳細ページを開く際にアップデートを確認する", "checkUpdateOnDetailPage": "アプリの詳細ページを開く際にアップデートを確認する",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "アプリを削除しますか?", "one": "アプリを削除しますか?",
"other": "アプリを削除しますか?" "other": "アプリを削除しますか?"

View File

@ -242,6 +242,7 @@
"pickHighestVersionCode": "Automatycznie wybierz najwyższy kod wersji APK", "pickHighestVersionCode": "Automatycznie wybierz najwyższy kod wersji APK",
"checkUpdateOnDetailPage": "Sprawdzaj aktualizacje podczas otwierania strony szczegółów aplikacji", "checkUpdateOnDetailPage": "Sprawdzaj aktualizacje podczas otwierania strony szczegółów aplikacji",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Usunąć aplikację?", "one": "Usunąć aplikację?",
"other": "Usunąć aplikacje?" "other": "Usunąć aplikacje?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Автовыбор кода наивысшей версии APK", "pickHighestVersionCode": "Автовыбор кода наивысшей версии APK",
"checkUpdateOnDetailPage": "Проверять наличие обновлений при открытии страницы представления приложения", "checkUpdateOnDetailPage": "Проверять наличие обновлений при открытии страницы представления приложения",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Удалить приложение?", "one": "Удалить приложение?",
"other": "Удалить приложения?" "other": "Удалить приложения?"

View File

@ -238,6 +238,7 @@
"pickHighestVersionCode": "Auto-select highest version code APK", "pickHighestVersionCode": "Auto-select highest version code APK",
"checkUpdateOnDetailPage": "Check for updates on opening an App detail page", "checkUpdateOnDetailPage": "Check for updates on opening an App detail page",
"disablePageTransitions": "Disable page transition animations", "disablePageTransitions": "Disable page transition animations",
"reversePageTransitions": "Reverse page transition animations",
"removeAppQuestion": { "removeAppQuestion": {
"one": "是否删除应用?", "one": "是否删除应用?",
"other": "是否删除应用?" "other": "是否删除应用?"

View File

@ -94,7 +94,9 @@ class _HomePageState extends State<HomePage> {
duration: Duration( duration: Duration(
milliseconds: milliseconds:
settingsProvider.disablePageTransitions ? 0 : 300), settingsProvider.disablePageTransitions ? 0 : 300),
reverse: isReversing, reverse: settingsProvider.reversePageTransitions
? !isReversing
: isReversing,
transitionBuilder: ( transitionBuilder: (
Widget child, Widget child,
Animation<double> animation, Animation<double> animation,

View File

@ -411,6 +411,21 @@ class _SettingsPageState extends State<SettingsPage> {
}) })
], ],
), ),
height16,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(
child: Text(tr('reversePageTransitions'))),
Switch(
value:
settingsProvider.reversePageTransitions,
onChanged: (value) {
settingsProvider.reversePageTransitions =
value;
})
],
),
height32, height32,
Text( Text(
tr('categories'), tr('categories'),

View File

@ -300,4 +300,13 @@ class SettingsProvider with ChangeNotifier {
prefs?.setBool('disablePageTransitions', show); prefs?.setBool('disablePageTransitions', show);
notifyListeners(); notifyListeners();
} }
bool get reversePageTransitions {
return prefs?.getBool('reversePageTransitions') ?? false;
}
set reversePageTransitions(bool show) {
prefs?.setBool('reversePageTransitions', show);
notifyListeners();
}
} }