Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mobile/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
analyzer:
errors:
use_build_context_synchronously: ignore
use_null_aware_elements: ignore
include: package:flutter_lints/flutter.yaml

linter:
Expand Down
4 changes: 1 addition & 3 deletions mobile/lib/controllers/auth.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:dio/dio.dart';
import 'package:mobile/models/user.dart';
import '../services/auth.dart';

class AuthState extends ChangeNotifier {
final AuthService _authService = AuthService();
final FlutterSecureStorage _storage = const FlutterSecureStorage();

String? _token;
bool _isLoading = false;
Expand Down Expand Up @@ -44,7 +42,7 @@ class AuthState extends ChangeNotifier {
}

Future<String?> checkAutoLogin() async {
_token = await _storage.read(key: "access_token");
_token = await _authService.getToken();

if (_token != null) {
await loadUserProfile();
Expand Down
Loading
Loading