laboratory_5

This commit is contained in:
nikbel2004@outlook.com 2024-09-29 17:00:08 +04:00
parent 26a69c374e
commit 0bee6d7055
2 changed files with 15 additions and 3 deletions

View File

@ -20,8 +20,8 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
final TextEditingController _searchController = TextEditingController();
final ApiInterface repository = PotterRepository();
// final ApiInterface repository = MockRepository();
// final ApiInterface repository = PotterRepository();
final ApiInterface repository = MockRepository();
late Future<List<CardData>?> _data;
@override

View File

@ -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")
];
}
}