diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f45b2..d0a86bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.10] - 2026-01-04 + +### Changed +- Removed page swipe transitions - all navigation is now instant (NoTransitionPage) + ## [1.1.9] - 2026-01-04 ### Changed diff --git a/lib/features/control_room/router.dart b/lib/features/control_room/router.dart index 808941c..6629af0 100644 --- a/lib/features/control_room/router.dart +++ b/lib/features/control_room/router.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:tatlock_ui/features/control_room/presentation/pages/control_room_page.dart'; +import 'package:tatlock_ui/routing/app_router.dart'; import 'package:tatlock_ui/shared/layouts/widgets/nav_panel.dart'; /// Route paths for Control Room. @@ -66,7 +67,8 @@ List controlRoomRoutes() { GoRoute( path: nav.path, name: 'controlRoom${_capitalize(nav.id.replaceAll('-', '_'))}', - builder: (context, state) => ControlRoomPage(nav: nav), + pageBuilder: (context, state) => + noTransitionPage(context, state, ControlRoomPage(nav: nav)), ), ]; } diff --git a/lib/features/security/router.dart b/lib/features/security/router.dart index 40e91af..3ebd06a 100644 --- a/lib/features/security/router.dart +++ b/lib/features/security/router.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:tatlock_ui/features/security/presentation/pages/security_page.dart'; +import 'package:tatlock_ui/routing/app_router.dart'; import 'package:tatlock_ui/shared/layouts/widgets/nav_panel.dart'; /// Route paths for Security room. @@ -60,7 +61,8 @@ List securityRoutes() { GoRoute( path: nav.path, name: 'security${_capitalize(nav.id.replaceAll('-', '_'))}', - builder: (context, state) => SecurityPage(nav: nav), + pageBuilder: (context, state) => + noTransitionPage(context, state, SecurityPage(nav: nav)), ), ]; } diff --git a/lib/routing/app_router.dart b/lib/routing/app_router.dart index abed9e5..dd028d4 100644 --- a/lib/routing/app_router.dart +++ b/lib/routing/app_router.dart @@ -8,6 +8,14 @@ import 'package:tatlock_ui/shared/layouts/app_scaffold.dart'; part 'app_router.g.dart'; +/// No-animation page builder for instant transitions +Page noTransitionPage(BuildContext context, GoRouterState state, Widget child) { + return NoTransitionPage( + key: state.pageKey, + child: child, + ); +} + /// Route paths as constants. abstract class AppRoutes { static const frontHall = '/'; @@ -29,21 +37,22 @@ GoRouter appRouter(Ref ref) { GoRoute( path: AppRoutes.frontHall, name: 'frontHall', - builder: (context, state) => const FrontHallPage(), + pageBuilder: (context, state) => + noTransitionPage(context, state, const FrontHallPage()), ), ...controlRoomRoutes(), ...securityRoutes(), GoRoute( path: AppRoutes.parlor, name: 'parlor', - builder: (context, state) => - const _PlaceholderPage(title: 'Parlor'), + pageBuilder: (context, state) => + noTransitionPage(context, state, const _PlaceholderPage(title: 'Parlor')), ), GoRoute( path: AppRoutes.settings, name: 'settings', - builder: (context, state) => - const _PlaceholderPage(title: 'Settings'), + pageBuilder: (context, state) => + noTransitionPage(context, state, const _PlaceholderPage(title: 'Settings')), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index cbd20b0..8b414a0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.9+1 +version: 1.1.10+1 environment: sdk: ^3.10.4