import 'package:flutter/material.dart'; import 'package:travel_mate/models/trip.dart'; class ShowTripDetailsContent extends StatefulWidget { final Trip trip; const ShowTripDetailsContent({super.key, required this.trip}); @override State createState() => _ShowTripDetailsContentState(); } class _ShowTripDetailsContentState extends State { @override Widget build(BuildContext context) { // You can access the trip via widget.trip return Scaffold( appBar: AppBar( title: Text(widget.trip.title), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( widget.trip.title, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), SizedBox(height: 8), Text(widget.trip.description), SizedBox(height: 16), Row( children: [ Icon(Icons.location_on, size: 16, color: Colors.grey[600]), SizedBox(width: 8), Text( widget.trip.location, style: TextStyle(fontSize: 14, color: Colors.grey[600]), ), ], ), SizedBox(height: 8), Row( children: [ Icon(Icons.calendar_today, size: 16, color: Colors.grey[600]), SizedBox(width: 8), Text( '${widget.trip.startDate.toLocal()} - ${widget.trip.endDate.toLocal()}', style: TextStyle(fontSize: 14, color: Colors.grey[600]), ), ], ), SizedBox(height: 8), Row( children: [ Icon(Icons.group, size: 16, color: Colors.grey[600]), SizedBox(width: 8), Text( '${widget.trip.participants.length} participant${widget.trip.participants.length > 1 ? 's' : ''}', style: TextStyle( fontSize: 14, color: Colors.grey[600], ), ), ], ), SizedBox(height: 16), Text('Budget: ${widget.trip.budget ?? 'N/A'}€'), SizedBox(height: 16), // Add more trip details as needed ], ), ) ); } }