51 lines
1.5 KiB
Dart
51 lines
1.5 KiB
Dart
|
import 'package:pmd/models/card_data.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class DetailsPage extends StatelessWidget {
|
||
|
final CardData data;
|
||
|
|
||
|
const DetailsPage({super.key, required this.data});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
appBar: AppBar(
|
||
|
title: Text('House ${data.name}'),
|
||
|
),
|
||
|
body: SingleChildScrollView(
|
||
|
padding: const EdgeInsets.all(30),
|
||
|
child: Column(
|
||
|
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",
|
||
|
height: 250,
|
||
|
width: 250,
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
const SizedBox(height: 20),
|
||
|
Text(
|
||
|
"Название ${data.name}",
|
||
|
style: const TextStyle(fontSize: 20, color: Colors.blue),
|
||
|
),
|
||
|
Text(
|
||
|
"Описание: ${data.location}.",
|
||
|
style: TextStyle(fontSize: 18),
|
||
|
),
|
||
|
Text(
|
||
|
"Описание: ${data.description}.",
|
||
|
style: TextStyle(fontSize: 18),
|
||
|
),
|
||
|
Text("Цена: ${data.price} Рублей/сутки",
|
||
|
style: TextStyle(fontSize: 24, color: Colors.orange)
|
||
|
)
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|