chore: fix 273+ analysis issues and repair corrupted core files

This commit is contained in:
2026-03-20 21:05:23 +05:30
parent d3159bc2ae
commit 39263a4af5
59 changed files with 265 additions and 3268 deletions

View File

@@ -9,7 +9,6 @@ import 'package:krow_domain/krow_domain.dart'
AppException,
BaseApiService,
ClientSession,
NetworkException,
PasswordMismatchException,
SignInFailedException,
SignUpFailedException,
@@ -111,19 +110,11 @@ class AuthRepositoryImpl implements AuthRepositoryInterface {
} on AppException {
rethrow;
} catch (e) {
// Map common Firebase-originated errors from the V2 API response
// to domain exceptions.
if (e is AppException) rethrow;
// Extract error code if available from the API response
final String errorMessage = e.toString();
if (errorMessage.contains('EMAIL_EXISTS') ||
errorMessage.contains('email-already-in-use')) {
throw AccountExistsException(technicalMessage: errorMessage);
} else if (errorMessage.contains('WEAK_PASSWORD') ||
errorMessage.contains('weak-password')) {
throw WeakPasswordException(technicalMessage: errorMessage);
} else if (errorMessage.contains('network-request-failed')) {
throw NetworkException(technicalMessage: errorMessage);
}
throw SignUpFailedException(technicalMessage: 'Unexpected error: $e');
_throwSignUpError('SIGN_UP_ERROR', errorMessage);
}
}

View File

@@ -1,9 +1,26 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_modular/flutter_modular.dart';
import 'package:krow_core/core.dart';
class ClientIntroPage extends StatelessWidget {
class ClientIntroPage extends StatefulWidget {
const ClientIntroPage({super.key});
@override
State<ClientIntroPage> createState() => _ClientIntroPageState();
}
class _ClientIntroPageState extends State<ClientIntroPage> {
@override
void initState() {
super.initState();
Future<void>.delayed(const Duration(seconds: 2), () {
if (mounted && Modular.to.path == ClientPaths.root) {
Modular.to.toClientGetStartedPage();
}
});
}
@override
Widget build(BuildContext context) {
return Scaffold(