import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pmd_lab/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: Color(0xFF272727), appBar: AppBar( backgroundColor: const Color(0xFF272727), // Тёмный фон AppBar iconTheme: const IconThemeData( color: Colors.white, ), title: Text( data.name, style: TextStyle( color: Colors.white, ), ), elevation: 0, systemOverlayStyle: SystemUiOverlayStyle.light, ), body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ 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, ), ), ), Padding( padding: const EdgeInsets.only(bottom: 4, top: 16, right: 20, left: 20), child: Text( data.description, style: const TextStyle( color: Colors.white70, fontSize: 20, fontWeight: FontWeight.normal, ), ), ) ]) ); } }