add organizateurs
This commit is contained in:
parent
fb34b41385
commit
519d20fd63
@ -68,10 +68,10 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
|
|||||||
String eventName = "";
|
String eventName = "";
|
||||||
String eventStartDate = "";
|
String eventStartDate = "";
|
||||||
String eventDescription = "";
|
String eventDescription = "";
|
||||||
String organizers = "";
|
|
||||||
String place = "";
|
String place = "";
|
||||||
String imgUrl = "";
|
String imgUrl = "";
|
||||||
List<String> tags = [];
|
List<String> tags = [];
|
||||||
|
List<String> organizers = [];
|
||||||
|
|
||||||
Events? events;
|
Events? events;
|
||||||
@override
|
@override
|
||||||
@ -86,11 +86,11 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
|
|||||||
var accessToken = prefs.getString("access_token") ?? "";
|
var accessToken = prefs.getString("access_token") ?? "";
|
||||||
String formerName = "";
|
String formerName = "";
|
||||||
String formerDate = "";
|
String formerDate = "";
|
||||||
String formerOrga = "";
|
|
||||||
String formerMap = "";
|
String formerMap = "";
|
||||||
String formerImage = "";
|
String formerImage = "";
|
||||||
String formerDesc = "";
|
String formerDesc = "";
|
||||||
List<String> formerTags = [];
|
List<String> formerTags = [];
|
||||||
|
List<String> formerOrga = [];
|
||||||
|
|
||||||
if (accessToken.isNotEmpty) {
|
if (accessToken.isNotEmpty) {
|
||||||
var urlGet = Uri.parse("${globals.api}/events/${widget.title}");
|
var urlGet = Uri.parse("${globals.api}/events/${widget.title}");
|
||||||
@ -106,6 +106,7 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
|
|||||||
"${events["place"]} - ${events["zip_code"]} ${events["city"]} - ${events["country"]}";
|
"${events["place"]} - ${events["zip_code"]} ${events["city"]} - ${events["country"]}";
|
||||||
formerDesc = events["description"];
|
formerDesc = events["description"];
|
||||||
formerTags = List<String>.from(events['tags'] as List);
|
formerTags = List<String>.from(events['tags'] as List);
|
||||||
|
formerOrga = List<String>.from(events['organizers'] as List);
|
||||||
final startDate = DateTime.parse(events["start_date"]);
|
final startDate = DateTime.parse(events["start_date"]);
|
||||||
final date = DateFormat.yMd().format(startDate);
|
final date = DateFormat.yMd().format(startDate);
|
||||||
final time = DateFormat.Hm().format(startDate);
|
final time = DateFormat.Hm().format(startDate);
|
||||||
@ -119,14 +120,6 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
formerDate = "${date} ${time} à ${dateE} ${timeE}";
|
formerDate = "${date} ${time} à ${dateE} ${timeE}";
|
||||||
if (events["organizers"].length > 0) {
|
|
||||||
formerOrga = "${events['organizers'][0]}";
|
|
||||||
for (var i = 1; i < events["organizers"].length; i++) {
|
|
||||||
formerOrga = "${formerOrga}, ${events['organizers'][i]}";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
formerOrga = "";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
var text = "";
|
var text = "";
|
||||||
switch (responseGet.statusCode) {
|
switch (responseGet.statusCode) {
|
||||||
@ -257,13 +250,42 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
|
|||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
Row(children: [
|
Row(children: [
|
||||||
Flexible(
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 8,
|
||||||
|
bottom: 8,
|
||||||
|
left: 8,
|
||||||
|
),
|
||||||
|
child: Wrap(
|
||||||
|
runSpacing: 4.0,
|
||||||
|
spacing: 4.0,
|
||||||
|
direction: Axis.vertical,
|
||||||
|
children: organizers.map((String tag) {
|
||||||
|
return Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(20.0),
|
||||||
|
),
|
||||||
|
color: Colors.blue,
|
||||||
|
),
|
||||||
|
margin: const EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10.0, vertical: 5.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${organizers}",
|
'$tag',
|
||||||
style: TextStyle(fontSize: 15.0),
|
style: const TextStyle(color: Colors.white),
|
||||||
maxLines: 3,
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
),
|
||||||
))
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList()),
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
Row(children: [
|
Row(children: [
|
||||||
Icon(Icons.description),
|
Icon(Icons.description),
|
||||||
@ -314,9 +336,6 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
|
|||||||
'$tag',
|
'$tag',
|
||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
onTap: () {
|
|
||||||
//print("$tag selected");
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user