I'm new to Flutter & Dart and trying to build an App.
My Goal for now is to build a List (Array), but with an "index" to access it later. Afterwards I want to output it within a widget. Unfortunately I haven't found any tutorials or helpful ressources on the web.
Build a List which contains the date & days for an event. I tried the following, but it doesn't work.
var events = [ {"day": "Monday", "date": "01.01.2019", "title": "Musical Event Austria"}, {"day": "Wednesday", "date", "01.01.2019", "title": "Musical Event 2"}];Loop throught the list and output it within a widget
new Container(decoration: const BoxDecoration( color: Color(0xFF0F1633), ), child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: events.map((day, date, title) => new Text(title)).toList(), ), ), ),
So how may I build the list the right way and output it? What I want to output inside a Text Widget is actually the title, date and day...but really tried many ways to acchieve it, no way. :)))
Thanks in advance!