handelData function
Implementation
Future<void> handelData(dynamic data, SharedPref pref) async {
if (data is Map<String, dynamic>) {
final accessToken = data['access_token'];
if (accessToken is String && accessToken.isNotEmpty) {
await pref.saveToken(accessToken);
}
final refreshToken = data['refresh_token'];
if (refreshToken is String && refreshToken.isNotEmpty) {
await pref.saveRefreshToken(refreshToken);
}
}
}