PIbd-31_Belianin_N._N._PMD/lib/details_page/details_page.dart

49 lines
1.3 KiB
Dart
Raw Normal View History

2024-09-20 16:16:06 +04:00
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),
),
],
),
),
);
}
}