add http put event

This commit is contained in:
Valentin CZERYBA 2024-07-30 23:37:21 +02:00
parent b4b09db5ef
commit cadd3ef2bf

View File

@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import '../main.dart';
mixin ShowEventDialog<T extends StatefulWidget> on State<T> {
void showEventDialog(BuildContext context, String text) {
// Create AlertDialog
AlertDialog dialog = AlertDialog(
title: Text("Evenement ajoute"),
content: Text(text),
actions: [
ElevatedButton(
child: Text("OK"),
style: ElevatedButton.styleFrom(
padding: EdgeInsets.symmetric(horizontal: 50, vertical: 20),
textStyle:
TextStyle(fontSize: 15, fontWeight: FontWeight.normal)),
onPressed: () {
Navigator.of(context).pop("Yes, Of course!"); // Return value
}),
],
);
// Call showDialog function to show dialog.
Future futureValue = showDialog(
context: context,
builder: (BuildContext context) {
return dialog;
});
}
}