mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-04 20:12:56 +00:00
37ffb93923
Version: 1.1.0 Major changes: - Implemented complete Flutter app structure with all core features - Added comprehensive UI screens for auth, countdown, goals, profile, settings, and social features - Integrated Supabase backend with authentication and data repositories - Added offline support with Hive caching and local storage - Implemented comprehensive routing with go_router - Added location services with Google Maps integration - Implemented notifications and home widget support - Added voice recording capabilities and AI chat features - Created comprehensive test suite and documentation - Added Android and iOS platform configurations - Implemented achievements system and social features - Added calendar integration and bucket list functionality This represents a complete Phase 1 milestone with 3,775 additions across 31 files.
66 lines
2.7 KiB
Dart
66 lines
2.7 KiB
Dart
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:mockito/annotations.dart';
|
|
import 'package:mockito/mockito.dart';
|
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
|
|
|
import 'package:lifetimer/data/repositories/auth_repository.dart';
|
|
import 'package:lifetimer/data/repositories/goals_repository.dart';
|
|
import 'package:lifetimer/data/repositories/countdown_repository.dart';
|
|
import 'package:lifetimer/data/repositories/user_repository.dart';
|
|
import 'package:lifetimer/data/repositories/social_repository.dart';
|
|
import 'package:lifetimer/data/repositories/notifications_repository.dart';
|
|
import 'package:lifetimer/features/auth/application/auth_controller.dart';
|
|
import 'package:lifetimer/features/goals/application/goals_controller.dart';
|
|
import 'package:lifetimer/features/countdown/application/countdown_controller.dart';
|
|
import 'package:lifetimer/features/settings/application/settings_controller.dart';
|
|
import 'package:lifetimer/features/social/application/social_controller.dart';
|
|
|
|
// Note: Run 'flutter pub run build_runner build' to generate mocks
|
|
@GenerateMocks([
|
|
AuthRepository,
|
|
GoalsRepository,
|
|
CountdownRepository,
|
|
UserRepository,
|
|
SocialRepository,
|
|
NotificationsRepository,
|
|
])
|
|
import 'mock_providers.mocks.dart';
|
|
|
|
/// Helper to create mock repositories for testing
|
|
class MockRepositories {
|
|
late MockAuthRepository authRepository;
|
|
late MockGoalsRepository goalsRepository;
|
|
late MockCountdownRepository countdownRepository;
|
|
late MockUserRepository userRepository;
|
|
late MockSocialRepository socialRepository;
|
|
late MockNotificationsRepository notificationsRepository;
|
|
|
|
MockRepositories() {
|
|
authRepository = MockAuthRepository();
|
|
goalsRepository = MockGoalsRepository();
|
|
countdownRepository = MockCountdownRepository();
|
|
userRepository = MockUserRepository();
|
|
socialRepository = MockSocialRepository();
|
|
notificationsRepository = MockNotificationsRepository();
|
|
}
|
|
|
|
/// Get all repository overrides
|
|
List<Override> get overrides => [
|
|
authRepositoryProvider.overrideWithValue(authRepository),
|
|
goalsRepositoryProvider.overrideWithValue(goalsRepository),
|
|
countdownRepositoryProvider.overrideWithValue(countdownRepository),
|
|
userRepositoryProvider.overrideWithValue(userRepository),
|
|
socialRepositoryProvider.overrideWithValue(socialRepository),
|
|
notificationsRepositoryProvider.overrideWithValue(notificationsRepository),
|
|
];
|
|
}
|
|
|
|
/// Helper to create a mock Supabase client
|
|
class MockSupabaseClient extends Mock implements SupabaseClient {}
|
|
|
|
/// Helper to create a mock Supabase auth
|
|
class MockSupabaseAuth extends Mock implements GoTrueClient {}
|
|
|
|
/// Helper to create a mock Supabase database
|
|
class MockSupabaseDatabase extends Mock implements PostgrestClient {}
|