From 0bee6d7055667879310fa0f03dcf6f633c5fa917 Mon Sep 17 00:00:00 2001 From: "nikbel2004@outlook.com" Date: Sun, 29 Sep 2024 17:00:08 +0400 Subject: [PATCH] laboratory_5 --- lib/home_page/home_page.dart | 4 ++-- lib/repositories/mock_repository.dart | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/home_page/home_page.dart b/lib/home_page/home_page.dart index eaa4be4..167894c 100644 --- a/lib/home_page/home_page.dart +++ b/lib/home_page/home_page.dart @@ -20,8 +20,8 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { final TextEditingController _searchController = TextEditingController(); - final ApiInterface repository = PotterRepository(); - // final ApiInterface repository = MockRepository(); + // final ApiInterface repository = PotterRepository(); + final ApiInterface repository = MockRepository(); late Future?> _data; @override diff --git a/lib/repositories/mock_repository.dart b/lib/repositories/mock_repository.dart index 651333c..57298e7 100644 --- a/lib/repositories/mock_repository.dart +++ b/lib/repositories/mock_repository.dart @@ -22,7 +22,19 @@ class MockRepository extends ApiInterface { image: "https://cdn0.youla.io/files/images/780_780/63/29/6329d9f543eedb62b7695786-1.jpg", location: "Moscow", - description: "house good, very good") + description: "house good, very good"), + CardData( + name: "house 3", + image: + "https://cdn0.youla.io/files/images/780_780/63/29/6329d9f543eedb62b7695786-1.jpg", + location: "Kazan", + description: "house good"), + CardData( + name: "house 4", + image: + "https://cdn0.youla.io/files/images/780_780/63/29/6329d9f543eedb62b7695786-1.jpg", + location: "Moscow", + description: "Moscow city") ]; } } \ No newline at end of file