Skip to content

Commit

Permalink
feat: Update UserRepository to use ClientHttpService for authentication
Browse files Browse the repository at this point in the history
This commit updates the UserRepository class to use the ClientHttpService for authentication. It replaces the previous implementation that used TextEditingController. This change allows for better separation of concerns and improves the overall structure of the code.
  • Loading branch information
Polabiel committed Aug 1, 2024
1 parent a724b27 commit d0b9bce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/app/splash_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:gohealth/api/services/client_http_service.dart';
import 'package:gohealth/src/app/home/home_page.dart';
import 'package:gohealth/src/app/login/login_page.dart';
import 'package:gohealth/api/repositories/user_repository.dart';
import 'package:http/http.dart';

class SplashPage extends StatefulWidget {
const SplashPage({super.key});
Expand All @@ -14,7 +16,8 @@ class SplashPageState extends State<SplashPage> {
@override
void initState() {
super.initState();
UserRepository.checkToken().then((value) {
UserRepository userRepository = UserRepository(ClientHttpService());
userRepository.checkToken().then((value) {
if (value) {
Navigator.pushReplacement(
context,
Expand Down

0 comments on commit d0b9bce

Please sign in to comment.