важный коммит

This commit is contained in:
dyakonovr 2024-09-15 22:05:51 +04:00
parent 03821f1260
commit 880c076f6b
3 changed files with 12 additions and 8 deletions

View File

@ -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 4'), home: const MyHomePage(title: 'Lab 4: '),
); );
} }
} }

View File

@ -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(

View File

@ -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))
], ],
), ),
) )