Compare commits
2 Commits
ec5437699c
...
880c076f6b
Author | SHA1 | Date | |
---|---|---|---|
|
880c076f6b | ||
|
03821f1260 |
@ -17,7 +17,7 @@ class MyApp extends StatelessWidget {
|
|||||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
),
|
),
|
||||||
home: const MyHomePage(title: 'Lab 3: Cards'),
|
home: const MyHomePage(title: 'Lab 4: '),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,10 @@ class DetailsPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtAT11wKgHrJBUYzIBFogucXg0a9fE0fQXDQ&s"),
|
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtAT11wKgHrJBUYzIBFogucXg0a9fE0fQXDQ&s",
|
||||||
|
height: 250,
|
||||||
|
width: 250,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Text(
|
Text(
|
||||||
|
@ -10,10 +10,7 @@ class _Card extends StatefulWidget {
|
|||||||
final VoidCallback? onTap;
|
final VoidCallback? onTap;
|
||||||
|
|
||||||
const _Card(
|
const _Card(
|
||||||
{required this.name,
|
{required this.name, required this.price, this.onLike, this.onTap});
|
||||||
required this.price,
|
|
||||||
this.onLike,
|
|
||||||
this.onTap});
|
|
||||||
|
|
||||||
factory _Card.fromData(
|
factory _Card.fromData(
|
||||||
CardData data, OnLikeFunction? onLike, VoidCallback? onTap) =>
|
CardData data, OnLikeFunction? onLike, VoidCallback? onTap) =>
|
||||||
@ -78,7 +75,10 @@ class _CardState extends State<_Card> {
|
|||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtAT11wKgHrJBUYzIBFogucXg0a9fE0fQXDQ&s"),
|
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtAT11wKgHrJBUYzIBFogucXg0a9fE0fQXDQ&s",
|
||||||
|
height: 250,
|
||||||
|
width: 250,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 50),
|
padding: const EdgeInsets.only(top: 50),
|
||||||
@ -87,7 +87,8 @@ class _CardState extends State<_Card> {
|
|||||||
children: [
|
children: [
|
||||||
Text(widget.name, style: const TextStyle(fontSize: 17)),
|
Text(widget.name, style: const TextStyle(fontSize: 17)),
|
||||||
Text("${widget.price} Руб",
|
Text("${widget.price} Руб",
|
||||||
style: const TextStyle(fontSize: 17, color: Colors.orange))
|
style:
|
||||||
|
const TextStyle(fontSize: 17, color: Colors.orange))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user