import 'package:flutter/material.dart'; class DetailPage extends StatelessWidget { final String title; final String texto; const DetailPage({ super.key, required this.title, required this.texto, }); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( flexibleSpace: Padding( padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top + -20), child: Image.asset( 'assets/header_image.png', fit: BoxFit.cover, ), ), toolbarHeight: MediaQuery.of(context).size.height * 0.19, ), body: Container( decoration: const BoxDecoration( color: Color.fromARGB(255, 254, 242, 221), ), child: Padding( padding: const EdgeInsets.all(16.0), child: SingleChildScrollView( // Agregado para evitar overflow child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( title, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), const SizedBox(height: 8), Text( texto, style: const TextStyle(fontSize: 18, color: Colors.black), textAlign: TextAlign.center, ), ], ), ), ), ), ); } }