Remove outdated Flutter migration documents and add new technical descriptions and profile repository implementation

- Deleted `next_steps_flutter.md` and `teknisk_beskrivning_flutter.md` files as they were outdated.
- Added new `next_steps_flutter.md` and `teknisk_beskrivning_flutter.md` files with updated migration plans and technical descriptions for the Flutter frontend.
- Implemented `profile_repository.dart` to handle profile data retrieval and updates using the API.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Nils-Johan Gynther
2026-04-23 16:40:02 +02:00
parent 6312fd5ce1
commit a5c13a4b3c
20 changed files with 2237 additions and 117 deletions
@@ -0,0 +1,27 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../core/api/api_client.dart';
import '../../../core/api/guarded_api_call.dart';
import '../../../core/api/api_exception.dart';
final profileRepositoryProvider = Provider<ProfileRepository>((ref) {
final apiClient = ref.read(apiClientProvider);
return ProfileRepository(apiClient);
});
class ProfileRepository {
final ApiClient _apiClient;
ProfileRepository(this._apiClient);
Future<Map<String, dynamic>> getProfile() async {
return guardedApiCall(
() => _apiClient.getJson('/api/profile'),
);
}
Future<Map<String, dynamic>> updateProfile(Map<String, dynamic> profileData) async {
return guardedApiCall(
() => _apiClient.patchJson('/api/profile', profileData),
);
}
}