import 'package:flutter/material.dart'; import '../models/character.dart'; // Убедитесь, что путь правильный class CharacterDetailPage extends StatelessWidget { final CharacterDTO characterDTO; const CharacterDetailPage({Key? key, required this.characterDTO}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(characterDTO.name), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Center( child: Image.network( characterDTO.imageUrl, height: 200, width: 200, fit: BoxFit.cover, ), ), SizedBox(height: 20), Text( characterDTO.name, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), SizedBox(height: 10), Text( characterDTO.typeString, style: TextStyle(fontSize: 18, color: Colors.grey[600]), ), SizedBox(height: 20), Text( 'Полное описание:', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), ), SizedBox(height: 10), Text( characterDTO.backstory, style: TextStyle(fontSize: 14), maxLines: null, softWrap: true, ), ], ), ), ); } }