fix datetpicker wip

This commit is contained in:
2024-12-08 21:23:51 +01:00
parent 4b71867ee0
commit c12a957099
2 changed files with 38 additions and 29 deletions

View File

@@ -18,6 +18,7 @@ import '../classes/events.dart';
import 'ListItemMenu.dart';
import 'MapboxPages.dart';
import 'ListItemByOrganizers.dart';
import 'EditEvent.dart';
void main() {
initializeDateFormatting("fr_FR", null).then((_) => (const MyApp()));
@@ -76,6 +77,8 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
List<String> tags = [];
List<String> organizers = [];
String id = "";
Events? events;
@override
void initState() {
@@ -104,6 +107,7 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
if (responseGet.statusCode == 200) {
stderr.writeln('Username : ${responseGet.body}');
var events = jsonDecode(utf8.decode(responseGet.bodyBytes));
id = events["id"];
formerName = events["name"];
formerMap = "${events["place"]}";
formerDesc = events["description"];
@@ -397,7 +401,12 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
),
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (_) => EditEvent(id: id)),
);
},
backgroundColor: Colors.blue,
tooltip: 'Recherche',
child: const Icon(Icons.edit, color: Colors.white),