2024-10-06 00:37:40 +04:00
|
|
|
import 'package:flutter_project/components/utils/error_callback.dart';
|
2024-10-04 23:46:07 +04:00
|
|
|
import 'package:flutter_project/data/repositories/api_interface.dart';
|
|
|
|
|
|
|
|
import '../../domain/models/card.dart';
|
2024-10-06 00:37:40 +04:00
|
|
|
import '../../domain/models/home.dart';
|
2024-10-04 23:46:07 +04:00
|
|
|
|
|
|
|
class MockRepository extends ApiInterface {
|
|
|
|
@override
|
2024-10-06 00:37:40 +04:00
|
|
|
Future<HomeData?> loadData({OnErrorCallback onError}) async {
|
|
|
|
return HomeData(
|
|
|
|
data: [
|
|
|
|
CardData(
|
2024-10-06 18:19:38 +04:00
|
|
|
name: "Test",
|
|
|
|
imageUrl: "https://loremflickr.com/250/150/cat",
|
|
|
|
descr: "descr",
|
|
|
|
type: "Type",
|
|
|
|
year: 2024,
|
|
|
|
rating: "R"),
|
2024-10-06 00:37:40 +04:00
|
|
|
CardData(
|
2024-10-06 18:19:38 +04:00
|
|
|
name: "Test 2",
|
|
|
|
imageUrl: "https://loremflickr.com/200/250/cat",
|
|
|
|
descr: "descr",
|
|
|
|
type: "Type",
|
|
|
|
year: 2024,
|
|
|
|
rating: "R"),
|
2024-10-06 00:37:40 +04:00
|
|
|
CardData(
|
2024-10-06 18:19:38 +04:00
|
|
|
name: "Test 3",
|
|
|
|
imageUrl: "https://loremflickr.com/200/200/cat",
|
|
|
|
descr: "descr",
|
|
|
|
type: "Type",
|
|
|
|
year: 2024,
|
|
|
|
rating: "R"),
|
2024-10-06 00:37:40 +04:00
|
|
|
],
|
|
|
|
);
|
2024-10-04 23:46:07 +04:00
|
|
|
}
|
|
|
|
}
|