From 8978b5624d91000ba9519dec0c11400a18487610 Mon Sep 17 00:00:00 2001 From: GokaPek Date: Mon, 23 Sep 2024 22:56:04 +0400 Subject: [PATCH] 3 --- lib/main.dart | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 1934f01..3dc6f94 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -46,16 +46,40 @@ class _MyHomePageState extends State { backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text(widget.title), ), - body: const MyWidget(), + body: const GrandWidget(), ); } } -class MyWidget extends StatelessWidget { - const MyWidget({super.key}); +class GrandWidget extends StatelessWidget { + const GrandWidget({super.key}); @override Widget build(BuildContext context) { - return const Placeholder(); + final data = [ + _CardData(text: "Батон", + info: "Белый хлеб, испечённый в виде продолговатой булки", + urlImage: "https://ru.freepik.com/free-photo/baton-bread-and-flour-on-table_8136565.htm#query=%D0%B1%D0%B0%D0%B3%D0%B5%D1%82&position=46&from_view=keyword&track=ais_hybrid&uuid=a7873756-425e-4011-bf7c-4cca79471eef"), + _CardData(text: "Багет", + info: "Длинный тонкий вид хлеба французского происхождения", + urlImage: "https://ru.freepik.com/free-photo/loaf-of-white-bread_7105195.htm#query=%D0%B1%D0%B0%D0%B3%D0%B5%D1%82&position=33&from_view=keyword&track=ais_hybrid&uuid=a7873756-425e-4011-bf7c-4cca79471eef"), + _CardData(text: "Круассан", + info: "Небольшое мучное кондитерское изделие, булочка в форме полумесяца из слоёного теста", + urlImage: "https://ru.freepik.com/free-photo/top-view-vegan-baked-products-arrangement_39543140.htm#query=%D0%B1%D0%B0%D0%B3%D0%B5%D1%82&position=21&from_view=keyword&track=ais_hybrid&uuid=a7873756-425e-4011-bf7c-4cca79471eef") + ]; + return Center( + child: Container( + padding: const EdgeInsets.all(16), + child: Text("Текст", + )), + ); } +} + +class _CardData { + final String text; + final String info; + final String urlImage; + + _CardData({required this.text, required this.info, required this.urlImage}); } \ No newline at end of file