upgrade mapbox
This commit is contained in:
34
covas_mobile_new/lib/classes/eventAdded.dart
Normal file
34
covas_mobile_new/lib/classes/eventAdded.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../pages/ListItemMenu.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.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => ListItemMenu())); // Return value
|
||||
}),
|
||||
],
|
||||
);
|
||||
|
||||
// Call showDialog function to show dialog.
|
||||
Future futureValue = showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return dialog;
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user