laboratory_3
This commit is contained in:
parent
b08b615cc2
commit
917b0fcf45
@ -35,10 +35,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Theme
|
||||
.of(context)
|
||||
.colorScheme
|
||||
.inversePrimary,
|
||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: Padding(
|
||||
@ -53,7 +50,11 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
}
|
||||
|
||||
class Card extends StatefulWidget {
|
||||
const Card({super.key, required this.name, required this.price, required this.location});
|
||||
const Card(
|
||||
{super.key,
|
||||
required this.name,
|
||||
required this.price,
|
||||
required this.location});
|
||||
|
||||
final String name;
|
||||
final double price;
|
||||
@ -78,7 +79,7 @@ class _CardState extends State<Card> {
|
||||
children: [
|
||||
Container(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 50, bottom: 15, left: 40, right: 40),
|
||||
const EdgeInsets.only(top: 50, bottom: 15, left: 40, right: 40),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.orange, width: 2),
|
||||
color: Colors.blue,
|
||||
@ -87,26 +88,29 @@ class _CardState extends State<Card> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
// Радиус скругления
|
||||
child: Image.network(
|
||||
"https://cdn0.youla.io/files/images/780_780/63/29/6329d9f543eedb62b7695786-1.jpg"),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 50),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(widget.name, style: TextStyle(fontSize: 17)),
|
||||
Text("Местоположение: ${widget.location}", style: TextStyle(fontSize: 15)),
|
||||
Text("${widget.price} Рублей/сутки",
|
||||
style: TextStyle(
|
||||
fontSize: 17, color: Colors.orange))
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 50),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(widget.name, style: TextStyle(fontSize: 17)),
|
||||
Text("Местоположение: ${widget.location}",
|
||||
style: TextStyle(fontSize: 15)),
|
||||
Text("${widget.price} Рублей/сутки",
|
||||
style: TextStyle(fontSize: 17, color: Colors.orange))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
right: 300,
|
||||
top: 10,
|
||||
@ -119,4 +123,3 @@ class _CardState extends State<Card> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user