72 lines
2.1 KiB
Dart
72 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../dialogs/add_event_dialog.dart';
|
|
import 'event_card.dart';
|
|
|
|
class EventScreen extends StatelessWidget {
|
|
const EventScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Événements'),
|
|
backgroundColor: const Color(0xFF1E1E2C),
|
|
actions: [
|
|
IconButton(
|
|
icon: const Icon(Icons.add_circle_outline, size: 28, color: Color(0xFF1DBF73)),
|
|
onPressed: () {
|
|
_showAddEventDialog(context);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
body: ListView.builder(
|
|
padding: const EdgeInsets.all(16.0),
|
|
itemCount: 10,
|
|
itemBuilder: (context, index) {
|
|
return EventCard(
|
|
profileImage: 'lib/assets/images/profile_picture.png',
|
|
name: 'Nom Prénom',
|
|
datePosted: 'Posté le 24/08/2024',
|
|
eventTitle: 'Titre de l\'événement',
|
|
eventDescription: 'Description détaillée de l\'événement...',
|
|
eventImageUrl: 'lib/assets/images/profile_picture.png',
|
|
reactionsCount: 120,
|
|
commentsCount: 45,
|
|
sharesCount: 30,
|
|
onReact: () {
|
|
// Logique pour réagir à l'événement
|
|
},
|
|
onComment: () {
|
|
// Logique pour commenter l'événement
|
|
},
|
|
onShare: () {
|
|
// Logique pour partager l'événement
|
|
},
|
|
onParticipate: () {
|
|
// Logique pour participer à l'événement
|
|
},
|
|
onCloseEvent: () {
|
|
// Logique pour fermer l'événement
|
|
},
|
|
onMoreOptions: () {
|
|
// Logique pour afficher plus d'options
|
|
},
|
|
assetImage: 'lib/assets/images/placeholder.png', // Ajoutez ce paramètre requis
|
|
);
|
|
},
|
|
),
|
|
backgroundColor: const Color(0xFF1E1E2C),
|
|
);
|
|
}
|
|
|
|
void _showAddEventDialog(BuildContext context) {
|
|
showDialog(
|
|
context: context,
|
|
builder: (BuildContext context) {
|
|
return const AddEventDialog();
|
|
},
|
|
);
|
|
}
|
|
}
|