add events function
This commit is contained in:
parent
ab297ffc77
commit
c44f1e51ea
@ -1,7 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'events.dart';
|
||||
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
mixin ShowDescImageAdd<T extends StatefulWidget> on State<T> {
|
||||
Future<void> 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<T extends StatefulWidget> on State<T> {
|
||||
TextButton(
|
||||
child: Text("Oui"),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop("Yes, Of course!"); // Return value
|
||||
addEvents(events); // Return value
|
||||
}),
|
||||
],
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user