PIbd31_Razubaev.S.M._PMU/lib/data/repositories/mock_repository.dart

18 lines
916 B
Dart
Raw Normal View History

import 'package:flutter_app/components/utils/error_callback.dart';
2024-10-16 12:08:15 +04:00
import 'package:flutter_app/data/repositories/api_interface.dart';
import 'package:flutter_app/domain/models/carddata.dart';
import 'package:flutter_app/presentation/home_page/home_page.dart';
2024-10-16 12:08:15 +04:00
class MockRepository extends ApiInterface {
@override
Future<HomeData?> loadData({OnErrorCallback? onError}) async {
return HomeData(
data: [
2024-10-16 12:08:15 +04:00
CardData('JoJos Bizarre Adventure', descriptionText: 'kono dio da', imageUrl: 'https://i1.sndcdn.com/avatars-253MmMf9QZzxVBJi-rvlyeg-t1080x1080.jpg'),
CardData('Example', descriptionText: 'what is this?', imageUrl: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQvaBQ6nAedlqvXsh-dLXZi2Gexy1RkDbTUKQ&s'),
CardData('Mock data', descriptionText: 'Mock data description', imageUrl: 'https://cdn-user30887.skyeng.ru/uploads/6692a339c6989979804399.png'),
],
);
2024-10-16 12:08:15 +04:00
}
}