more precision place
This commit is contained in:
parent
80dc1155c2
commit
70d18ea980
@ -131,7 +131,7 @@ class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
|||||||
gemini
|
gemini
|
||||||
.textAndImage(
|
.textAndImage(
|
||||||
text:
|
text:
|
||||||
"Peux-tu donner le nom, la date avec l'année actuelle ou d'une année future proche et le lieu de l'évènement sous format JSON avec les valeurs suivantes : name, place, date sous le format en YYYY-MM-DD HH:mm:ssZ, et sans la présence du mot json dans la chaîne de caractère",
|
"Peux-tu donner le nom, la date avec l'année actuelle ou d'une année future proche et le lieu de l'évènement sous format JSON avec les valeurs suivantes : name, address, city, zip_code, country, date sous le format en YYYY-MM-DD HH:mm:ssZ, et sans la présence du mot json dans la chaîne de caractère",
|
||||||
images: [file.readAsBytesSync()],
|
images: [file.readAsBytesSync()],
|
||||||
modelName: "models/gemini-1.5-pro-latest")
|
modelName: "models/gemini-1.5-pro-latest")
|
||||||
.then((value) => searchEvents(value?.content?.parts?.last.text ?? ''))
|
.then((value) => searchEvents(value?.content?.parts?.last.text ?? ''))
|
||||||
|
@ -42,7 +42,12 @@ class UpdateeventImage extends StatefulWidget {
|
|||||||
class _UpdateeventImageState extends State<UpdateeventImage>
|
class _UpdateeventImageState extends State<UpdateeventImage>
|
||||||
with ShowErrorDialog, ShowEventDialog {
|
with ShowErrorDialog, ShowEventDialog {
|
||||||
TextEditingController inputName = TextEditingController();
|
TextEditingController inputName = TextEditingController();
|
||||||
TextEditingController inputPlace = TextEditingController();
|
TextEditingController inputAddress = TextEditingController();
|
||||||
|
TextEditingController inputZipCode = TextEditingController();
|
||||||
|
|
||||||
|
TextEditingController inputCity = TextEditingController();
|
||||||
|
TextEditingController inputCountry = TextEditingController();
|
||||||
|
|
||||||
TextEditingController inputDate = TextEditingController();
|
TextEditingController inputDate = TextEditingController();
|
||||||
TextEditingController startDatepicker = TextEditingController();
|
TextEditingController startDatepicker = TextEditingController();
|
||||||
TextEditingController startTimepicker = TextEditingController();
|
TextEditingController startTimepicker = TextEditingController();
|
||||||
@ -85,7 +90,7 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
|||||||
Future<void> _updateEvent(BuildContext context) async {
|
Future<void> _updateEvent(BuildContext context) async {
|
||||||
var url = Uri.parse("${globals.api}/token");
|
var url = Uri.parse("${globals.api}/token");
|
||||||
var name = inputName.text;
|
var name = inputName.text;
|
||||||
var place = inputPlace.text;
|
var place = inputCity.text;
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
var accessToken = prefs.getString("access_token") ?? "";
|
var accessToken = prefs.getString("access_token") ?? "";
|
||||||
List<String> send = ["toto"];
|
List<String> send = ["toto"];
|
||||||
@ -165,7 +170,11 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
|||||||
|
|
||||||
void start() async {
|
void start() async {
|
||||||
inputName.text = widget.events["name"];
|
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"]}");
|
print("date start : ${widget.events["date"]}");
|
||||||
DateTime pickedDate = DateTime.parse(widget.events["date"]);
|
DateTime pickedDate = DateTime.parse(widget.events["date"]);
|
||||||
startDatepicker.text = DateFormat("dd-MM-yyyy").format(pickedDate);
|
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),
|
left: 15.0, right: 15.0, top: 15, bottom: 0),
|
||||||
//padding: EdgeInsets.symmetric(horizontal: 15),
|
//padding: EdgeInsets.symmetric(horizontal: 15),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: inputPlace,
|
controller: inputAddress,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
labelText: 'Lieu',
|
labelText: 'Adresse',
|
||||||
hintText: 'Entrer le lieu'),
|
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(
|
Padding(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user