Add manual auth screen
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-07-02 19:50:25 +02:00
parent ce1c175c62
commit c8fa4552bb
15 changed files with 163 additions and 42 deletions

View File

@ -6,25 +6,23 @@ import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:moneymgr_mobile/utils/extensions.dart';
import 'package:moneymgr_mobile/utils/hooks.dart';
/// A button that shows a circular progress indicator when the [onPressed] callback
/// is pending.
class AppButton extends HookWidget {
const AppButton({
super.key,
required this.onPressed,
required this.label,
});
const AppButton({super.key, required this.onPressed, required this.label});
final AsyncCallback? onPressed;
final String label;
@override
Widget build(BuildContext context) {
final (:pending, :snapshot, hasError: _) = useAsyncTask();
final (:pending, :snapshot, :hasError) = useAsyncTask();
return FilledButton(
onPressed: onPressed == null ? null : () => pending.value = onPressed!(),
style: ButtonStyle(
backgroundColor: hasError ? WidgetStatePropertyAll(Colors.red) : null,
),
child: SeparatedRow(
separatorBuilder: () => const GutterSmall(),
mainAxisAlignment: MainAxisAlignment.center,