more precision place

This commit is contained in:
2024-08-30 23:57:10 +02:00
parent 80dc1155c2
commit 70d18ea980
2 changed files with 52 additions and 7 deletions

View File

@@ -42,7 +42,12 @@ class UpdateeventImage extends StatefulWidget {
class _UpdateeventImageState extends State<UpdateeventImage>
with ShowErrorDialog, ShowEventDialog {
TextEditingController inputName = TextEditingController();
TextEditingController inputPlace = TextEditingController();
TextEditingController inputAddress = TextEditingController();
TextEditingController inputZipCode = TextEditingController();
TextEditingController inputCity = TextEditingController();
TextEditingController inputCountry = TextEditingController();
TextEditingController inputDate = TextEditingController();
TextEditingController startDatepicker = TextEditingController();
TextEditingController startTimepicker = TextEditingController();
@@ -85,7 +90,7 @@ class _UpdateeventImageState extends State<UpdateeventImage>
Future<void> _updateEvent(BuildContext context) async {
var url = Uri.parse("${globals.api}/token");
var name = inputName.text;
var place = inputPlace.text;
var place = inputCity.text;
SharedPreferences prefs = await SharedPreferences.getInstance();
var accessToken = prefs.getString("access_token") ?? "";
List<String> send = ["toto"];
@@ -165,7 +170,11 @@ class _UpdateeventImageState extends State<UpdateeventImage>
void start() async {
inputName.text = widget.events["name"];
inputPlace.text = widget.events["place"];
inputCity.text = widget.events["city"];
inputAddress.text = widget.events["address"];
inputZipCode.text = widget.events["zip_code"];
inputCountry.text = widget.events["country"];
print("date start : ${widget.events["date"]}");
DateTime pickedDate = DateTime.parse(widget.events["date"]);
startDatepicker.text = DateFormat("dd-MM-yyyy").format(pickedDate);
@@ -220,11 +229,47 @@ class _UpdateeventImageState extends State<UpdateeventImage>
left: 15.0, right: 15.0, top: 15, bottom: 0),
//padding: EdgeInsets.symmetric(horizontal: 15),
child: TextField(
controller: inputPlace,
controller: inputAddress,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Lieu',
hintText: 'Entrer le lieu'),
labelText: 'Adresse',
hintText: 'Entrer une adresse'),
),
),
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 15, bottom: 0),
//padding: EdgeInsets.symmetric(horizontal: 15),
child: TextField(
controller: inputZipCode,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Code postal',
hintText: 'Entrer un code postal'),
),
),
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 15, bottom: 0),
//padding: EdgeInsets.symmetric(horizontal: 15),
child: TextField(
controller: inputCity,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Ville',
hintText: 'Entrer une ville'),
),
),
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 15, bottom: 0),
//padding: EdgeInsets.symmetric(horizontal: 15),
child: TextField(
controller: inputCountry,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Pays',
hintText: 'Entrer un pays'),
),
),
Padding(