feat: bugfixes, finished go_router migration, implemented better visibility of states

This commit is contained in:
Anton Stubenbord
2023-10-06 01:17:08 +02:00
parent ad23df4f89
commit a2c5ced3b7
102 changed files with 1512 additions and 3090 deletions

View File

@@ -0,0 +1,64 @@
import 'package:flutter/material.dart';
import 'package:paperless_mobile/extensions/flutter_extensions.dart';
import 'package:paperless_mobile/features/login/cubit/authentication_cubit.dart';
import 'package:paperless_mobile/generated/l10n/app_localizations.dart';
import 'package:paperless_mobile/routes/typed/top_level/login_route.dart';
import 'package:provider/provider.dart';
class VerifyIdentityPage extends StatelessWidget {
final String userId;
const VerifyIdentityPage({super.key, required this.userId});
@override
Widget build(BuildContext context) {
return Material(
child: Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Theme.of(context).colorScheme.background,
title: Text(S.of(context)!.verifyYourIdentity),
),
bottomNavigationBar: BottomAppBar(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
onPressed: () {
const LoginToExistingAccountRoute().go(context);
},
child: Text(S.of(context)!.goToLogin),
),
FilledButton(
onPressed: () =>
context.read<AuthenticationCubit>().restoreSession(userId),
child: Text(S.of(context)!.verifyIdentity),
),
],
),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
S.of(context)!.useTheConfiguredBiometricFactorToAuthenticate,
textAlign: TextAlign.center,
).paddedSymmetrically(horizontal: 16),
const Icon(
Icons.fingerprint,
size: 96,
),
// Wrap(
// alignment: WrapAlignment.spaceBetween,
// runAlignment: WrapAlignment.spaceBetween,
// runSpacing: 8,
// spacing: 8,
// children: [
// ],
// ).padded(16),
],
),
),
);
}
}