This commit is contained in:
Tomas Dvorak
2026-01-04 17:28:01 +01:00
parent 37ffb93923
commit 71af3a0828
15 changed files with 103 additions and 147 deletions
@@ -56,11 +56,6 @@ class AuthController extends StateNotifier<User?> {
_analytics.logSignIn(method: 'google');
}
Future<void> signInWithApple() async {
await _authRepository.signInWithApple();
_analytics.logSignIn(method: 'apple');
}
Future<void> signInWithGithub() async {
await _authRepository.signInWithGithub();
_analytics.logSignIn(method: 'github');
@@ -35,23 +35,6 @@ class _AuthChoiceScreenState extends ConsumerState<AuthChoiceScreen> {
}
Future<void> _handleAppleSignIn() async {
setState(() => _isLoading = true);
try {
await ref.read(authControllerProvider.notifier).signInWithApple();
} catch (e) {
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Apple sign-in failed: $e')),
);
}
} finally {
if (mounted) {
setState(() => _isLoading = false);
}
}
}
Future<void> _handleGithubSignIn() async {
setState(() => _isLoading = true);
try {
@@ -164,13 +147,6 @@ class _AuthChoiceScreenState extends ConsumerState<AuthChoiceScreen> {
onPressed: _handleGoogleSignIn,
),
const SizedBox(height: 12),
_SocialButton(
icon: Icons.apple,
label: 'Continue with Apple',
isLoading: _isLoading,
onPressed: _handleAppleSignIn,
),
const SizedBox(height: 12),
_SocialButton(
icon: Icons.code,
label: 'Continue with GitHub',