69 lines
2.1 KiB
Dart
Raw Normal View History

2024-10-25 21:48:27 +04:00
import 'package:flutter/material.dart';
2024-12-20 18:13:20 +04:00
import 'package:flutter/services.dart';
2024-10-25 21:48:27 +04:00
import 'package:pmd_lab/domain/models/card.dart';
class DetailsPage extends StatelessWidget {
2024-11-27 23:10:56 +04:00
final CardData data;
2024-10-25 21:48:27 +04:00
const DetailsPage(this.data, {super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
2024-12-20 18:13:20 +04:00
backgroundColor: Color(0xFF272727),
appBar: AppBar(
backgroundColor: const Color(0xFF272727), // Тёмный фон AppBar
iconTheme: const IconThemeData(
color: Colors.white,
),
2024-12-21 02:47:21 +04:00
title: Text(
data.name,
2024-12-20 18:13:20 +04:00
style: TextStyle(
color: Colors.white,
),
),
elevation: 0,
systemOverlayStyle: SystemUiOverlayStyle.light,
),
2024-12-17 14:33:28 +04:00
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
2024-12-20 18:13:20 +04:00
Stack(children: [
ClipRRect(
child: Image.network(
data.img ?? '',
errorBuilder: (_, __, ___) => const Placeholder(),
height: 370,
alignment: Alignment.topCenter,
fit: BoxFit.cover,
width: double.infinity,
),
),
]),
Padding(
padding: const EdgeInsets.only(bottom: 4, top: 16, right: 20, left: 20),
child: Text(
data.name,
style: const TextStyle(
color: Colors.white70,
fontSize: 30,
fontWeight: FontWeight.bold,
),
),
2024-12-17 14:33:28 +04:00
),
2024-12-20 18:13:20 +04:00
Padding(
padding: const EdgeInsets.only(bottom: 4, top: 16, right: 20, left: 20),
2024-12-17 14:33:28 +04:00
child: Text(
2024-12-20 18:13:20 +04:00
data.description,
style: const TextStyle(
color: Colors.white70,
fontSize: 20,
fontWeight: FontWeight.normal,
),
2024-12-17 14:33:28 +04:00
),
)
2024-12-20 18:13:20 +04:00
])
);
2024-10-25 21:48:27 +04:00
}
}