One UI in flutter
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.

24 lines
524 B

2 years ago
import 'dart:convert';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../js/initial_route.dart';
import '../model/one_user_model.dart';
void redirectToHome() {
2 years ago
parentHome();
2 years ago
}
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;
});