PMU_Puchkina_A.A_PIbd-32/lib/repositories/mock_repository.dart

61 lines
2.1 KiB
Dart
Raw Permalink Normal View History

2024-10-08 01:29:38 +04:00
import 'package:app/domain/models/card.dart';
import 'package:app/domain/models/home.dart';
2024-10-08 01:29:38 +04:00
import 'package:app/repositories/api_interface.dart';
import 'package:flutter/material.dart';
2024-10-08 01:29:38 +04:00
class MockRepository extends ApiInterface {
2024-10-08 01:29:38 +04:00
@override
Future<HomeData?> loadData({OnErrorCallback? onError}) async {
return HomeData(data: [
2024-10-08 01:29:38 +04:00
CardData(
descriptionText: 'И давно тебе 17?',
'Бенто-торт "Сумерки"',
imageUrl:
'https://i.pinimg.com/736x/ef/5a/80/ef5a80844de4afb19750d67f1f5be04d.jpg',
speciesText: '',
locationText: '',
),
CardData(
'Бенто-торт "Material Girl"',
descriptionText: 'Главное какой fabric, какой material',
imageUrl:
'https://i.pinimg.com/736x/f5/88/0c/f5880cc5b09e602c1849d4093d17eb8e.jpg',
speciesText: '',
locationText: '',
2024-10-08 01:29:38 +04:00
),
CardData(
'Бенто-торт "Шрек"',
descriptionText: 'Somebody once told me the world is gonna roll me',
imageUrl:
'https://i.pinimg.com/736x/a9/0d/fb/a90dfb9dfe3b4f4e1c5ce3cb99847a1e.jpg',
speciesText: '',
locationText: '',
2024-10-08 01:29:38 +04:00
),
CardData(
'Бенто-торт "Дурак"',
descriptionText: 'Сам дурак',
imageUrl:
'https://i.pinimg.com/564x/11/87/8a/11878a2f6a0c5d26e38ce68cbbe21337.jpg',
speciesText: '',
locationText: '',
2024-10-08 01:29:38 +04:00
),
CardData(
'Бенто-торт "Совунья"',
descriptionText: 'Я просто смешариков люблю',
imageUrl:
'https://i.pinimg.com/564x/85/61/d2/8561d2b601fe9eb72c4e2031bbb6ba24.jpg',
speciesText: '',
locationText: '',
2024-10-08 01:29:38 +04:00
),
CardData(
'Бенто-торт "В смысле 28?"',
descriptionText: 'Напишем любой возраст (или срок)',
imageUrl:
'https://i.pinimg.com/564x/ae/76/0a/ae760af69d9a0c12938753a372112ee4.jpg',
speciesText: '',
locationText: '',
2024-10-08 01:29:38 +04:00
),
]);
2024-10-08 01:29:38 +04:00
}
}