From 0ae1311b53aed99a98843f4f5f794cc7485d440a Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 27 Jul 2024 19:40:02 +0200 Subject: [PATCH] redirect to itemmenu --- covas_mobile/lib/classes/getEventImage.dart | 2 +- covas_mobile/lib/pages/DisplayPictureScreen.dart | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/covas_mobile/lib/classes/getEventImage.dart b/covas_mobile/lib/classes/getEventImage.dart index 6144171..a0db5dc 100644 --- a/covas_mobile/lib/classes/getEventImage.dart +++ b/covas_mobile/lib/classes/getEventImage.dart @@ -37,7 +37,7 @@ mixin ShowDescImageGet on State { } } - void showDescImageUpdateDialog(BuildContext context, var events) { + void showDescImageGetDialog(BuildContext context, var events) { // Create AlertDialog String name = events['name']; AlertDialog dialog = AlertDialog( diff --git a/covas_mobile/lib/pages/DisplayPictureScreen.dart b/covas_mobile/lib/pages/DisplayPictureScreen.dart index 9256a28..aef62c5 100644 --- a/covas_mobile/lib/pages/DisplayPictureScreen.dart +++ b/covas_mobile/lib/pages/DisplayPictureScreen.dart @@ -6,6 +6,7 @@ import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_gemini/flutter_gemini.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:http/http.dart' as http; +import "ItemMenu.dart"; import 'dart:convert'; @@ -85,6 +86,11 @@ class DisplayPictureScreenState extends State print("reponse http : ${events.length}"); if (events.length == 0) { showDescImageAddDialog(context, jsonData); + } else { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => ItemMenu(title: events[0]["id"]))); } } } else {