2024-09-29 20:01:48 +04:00
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import '../../domain/models/card.dart';
|
|
|
|
|
|
|
|
|
|
class DetailsPage extends StatelessWidget {
|
|
|
|
|
final CardData data;
|
|
|
|
|
|
|
|
|
|
const DetailsPage(this.data, {super.key});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: Colors.amber,
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: const Text("окно с детальной информацией"),
|
2024-10-01 00:37:49 +04:00
|
|
|
|
backgroundColor: Colors.amber,
|
2024-09-29 20:01:48 +04:00
|
|
|
|
),
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 20, top: 20, right: 20),
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
data.imageUrl ?? '',
|
|
|
|
|
errorBuilder: (_, __, ___) => const Placeholder(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: const EdgeInsets.all(20),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
color: const Color.fromARGB(255, 250, 235, 159),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(.5),
|
|
|
|
|
blurRadius: 8,
|
|
|
|
|
offset: const Offset(0, 5),
|
|
|
|
|
spreadRadius: 4,
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8),
|
|
|
|
|
child: Text(
|
|
|
|
|
data.text,
|
|
|
|
|
style: Theme.of(context).textTheme.headlineLarge,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
2024-10-01 22:57:57 +04:00
|
|
|
|
Container(
|
|
|
|
|
margin: const EdgeInsets.all(20),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
color: const Color.fromARGB(255, 250, 235, 159),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(.5),
|
|
|
|
|
blurRadius: 8,
|
|
|
|
|
offset: const Offset(0, 5),
|
|
|
|
|
spreadRadius: 4,
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
|
child: Text(
|
|
|
|
|
data.description ?? '',
|
|
|
|
|
style: Theme.of(context).textTheme.headlineLarge,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
2024-09-29 20:01:48 +04:00
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|