diff --git a/covas_mobile/lib/classes/descriptionImage.dart b/covas_mobile/lib/classes/descriptionImage.dart index b6243d8..daed5b8 100644 --- a/covas_mobile/lib/classes/descriptionImage.dart +++ b/covas_mobile/lib/classes/descriptionImage.dart @@ -1,7 +1,14 @@ import 'package:flutter/material.dart'; import 'events.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + mixin ShowDescImageAdd on State { + Future addEvents(var events) async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var accessToken = prefs.getString("access_token") ?? ""; + } + void showDescImageAddDialog(BuildContext context, var events) { // Create AlertDialog String name = events['name']; @@ -17,7 +24,7 @@ mixin ShowDescImageAdd on State { TextButton( child: Text("Oui"), onPressed: () { - Navigator.of(context).pop("Yes, Of course!"); // Return value + addEvents(events); // Return value }), ], );