loadRecentBlogs method
Get recent blogs
Implementation
Future<void> loadRecentBlogs({int limit = 5}) async {
try {
isLoading.value = true;
errorMessage.value = '';
final recentBlogs = await apiService.getRecentBlogs(limit: limit);
blogs.value = recentBlogs;
} catch (e) {
errorMessage.value = e.toString();
} finally {
isLoading.value = false;
}
}