mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 14:08:00 -06:00
chore: Update go_router configuration to use go_router_builder
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:paperless_mobile/features/settings/view/dialogs/switch_account_d
|
||||
import 'package:paperless_mobile/features/settings/view/widgets/global_settings_builder.dart';
|
||||
import 'package:paperless_mobile/features/users/view/widgets/user_account_list_tile.dart';
|
||||
import 'package:paperless_mobile/generated/l10n/app_localizations.dart';
|
||||
import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart';
|
||||
import 'package:paperless_mobile/routes/typed/top_level/add_account_route.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
@@ -146,35 +147,7 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
|
||||
Future<void> _onAddAccount(BuildContext context, String currentUser) async {
|
||||
Navigator.of(context).pop();
|
||||
AddAccountRoute().push<String>(context);
|
||||
// final userId = await Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => AddAccountPage(
|
||||
// titleText: S.of(context)!.addAccount,
|
||||
// onSubmit: (context, username, password, serverUrl,
|
||||
// clientCertificate) async {
|
||||
// try {
|
||||
// final userId =
|
||||
// await context.read<AuthenticationCubit>().addAccount(
|
||||
// credentials: LoginFormCredentials(
|
||||
// username: username,
|
||||
// password: password,
|
||||
// ),
|
||||
// clientCertificate: clientCertificate,
|
||||
// serverUrl: serverUrl,
|
||||
// //TODO: Ask user whether to enable biometric authentication
|
||||
// enableBiometricAuthentication: false,
|
||||
// );
|
||||
|
||||
// Navigator.of(context).pop<String?>(userId);
|
||||
// } on PaperlessFormValidationException catch (error) {}
|
||||
// },
|
||||
// submitText: S.of(context)!.addAccount,
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
const AddAccountRoute().push<String>(context);
|
||||
}
|
||||
|
||||
void _onSwitchAccount(
|
||||
|
||||
Reference in New Issue
Block a user