You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
524 B
23 lines
524 B
import 'dart:convert'; |
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart'; |
|
|
|
import '../js/initial_route.dart'; |
|
import '../model/one_user_model.dart'; |
|
|
|
void redirectToHome() { |
|
parentHome(); |
|
} |
|
|
|
final localAuthProvider = Provider<OneLocalUserModel?>((ref) { |
|
try { |
|
String? user = getUser(); |
|
String? token = getToken(); |
|
if (user != null) { |
|
final localUser = OneLocalUserModel.fromJson(jsonDecode(user)); |
|
localUser.token = token; |
|
return localUser; |
|
} |
|
} catch (_) {} |
|
return null; |
|
});
|
|
|