PIbd-31_Belianin_N._N._PMD/lib/details_page/details_page.dart
nikbel2004@outlook.com 1430fe1986 laboratory_5
2024-09-20 16:16:06 +04:00

49 lines
1.3 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(
data.image,
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),
),
],
),
),
);
}
}