refactor: migrate to go_router navigation

This commit is contained in:
cogwheel0
2025-09-22 14:36:43 +05:30
parent 462bf4cde2
commit 66a28958ed
11 changed files with 468 additions and 410 deletions

View File

@@ -1,38 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../core/widgets/error_boundary.dart';
import '../../../shared/theme/theme_extensions.dart';
import '../../../shared/widgets/conduit_components.dart';
import 'package:conduit/l10n/app_localizations.dart';
import 'server_connection_page.dart';
/// Entry point for the connection and sign-in flow
/// Redirects to the mobile-first two-step process
/// Entry point for the connection and sign-in flow.
/// We now forward directly to the server connection experience.
class ConnectAndSignInPage extends ConsumerWidget {
const ConnectAndSignInPage({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
// Directly navigate to the new mobile-first server connection page
WidgetsBinding.instance.addPostFrameCallback((_) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (_) => const ServerConnectionPage(),
),
);
});
// Show a simple loading state while transitioning
return ErrorBoundary(
child: Scaffold(
backgroundColor: context.conduitTheme.surfaceBackground,
body: Center(
child: ConduitLoadingIndicator(
message: AppLocalizations.of(context)!.loadingContent,
),
),
),
);
return const ServerConnectionPage();
}
}